1 2003-02-13 Anders Carlsson <andersca@codefactory.se>
3 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4 * dbus/dbus-message.c: (process_test_subdir):
5 * test/break-loader.c: (find_breaks_based_on):
6 Plug some memory leaks.
8 2003-02-13 Richard Hult <rhult@codefactory.se>
10 * bus/main.c: Fix build.
13 * dbus/dbus-errors.c: Fix copyright for Anders.
15 2003-02-13 Anders Carlsson <andersca@codefactory.se>
20 * bus/connection.c: (bus_connection_foreach):
23 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
24 (unescape_string), (new_section), (parse_section_start),
25 (parse_key_value), (report_error), (bus_desktop_file_load),
26 (bus_desktop_file_get_string):
28 Use DBusError for error reporting.
30 * bus/dispatch.c: (send_one_message),
31 (bus_dispatch_message_handler):
32 * bus/driver.c: (bus_driver_send_service_deleted),
33 (bus_driver_send_service_created), (bus_driver_send_service_lost),
34 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
35 (bus_driver_send_welcome_message),
36 (bus_driver_handle_list_services),
37 (bus_driver_handle_acquire_service),
38 (bus_driver_handle_service_exists):
39 * bus/loop.c: (bus_loop_run):
41 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
43 * bus/utils.c: (bus_wait_for_memory):
45 New files with general utility functions.
47 * dbus/dbus-internals.h:
48 Remove _DBUS_HANDLE_OOM.
50 2003-02-13 Anders Carlsson <andersca@codefactory.se>
52 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
53 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
55 Add DBusError structure.
57 2003-02-13 Anders Carlsson <andersca@codefactory.se>
59 * test/data/valid-messages/standard-acquire-service.message:
60 * test/data/valid-messages/standard-hello.message:
61 * test/data/valid-messages/standard-list-services.message:
62 * test/data/valid-messages/standard-service-exists.message:
63 Add some standard messages.
65 2003-02-13 Anders Carlsson <andersca@codefactory.se>
67 * bus/driver.c: (bus_driver_send_welcome_message),
68 (bus_driver_handle_list_services),
69 (bus_driver_handle_acquire_service),
70 (bus_driver_handle_service_exists), (bus_driver_handle_message):
71 Update for API changes in libdbus.
73 * dbus/dbus-message.c: (dbus_message_new_reply):
74 * dbus/dbus-message.h:
75 Remove the name argument. The spec states that replies shouldn't
78 2003-02-13 Anders Carlsson <andersca@codefactory.se>
80 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
81 (report_error), (bus_desktop_file_load), (lookup_section),
82 (lookup_line), (bus_desktop_file_get_raw),
83 (bus_desktop_file_get_string):
85 Some fixes, and new functions for getting a key value from a section.
87 2003-02-13 Havoc Pennington <hp@pobox.com>
89 * test/data/auth/fail-after-n-attempts.auth-script: new test
91 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
94 2003-02-13 Havoc Pennington <hp@pobox.com>
96 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
97 dbus_credentials_match were backward
99 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
100 NO_CREDENTIALS and ROOT_CREDENTIALS
102 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
103 into here. Never process more commands after we've reached an
104 end state; store further data as unused bytes.
106 * test/data/auth/*: add more auth tests
108 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
109 command to match exact string and EXPECT_UNUSED to match unused
112 * test/Makefile.am (dist-hook): fix to dist all the test stuff
114 2003-02-12 Havoc Pennington <hp@pobox.com>
116 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
117 \r off of popped lines
119 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
122 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
125 2003-02-12 Havoc Pennington <hp@pobox.com>
127 * dbus/Makefile.am: remove break-loader from the build, since it
130 * configure.in: add --enable-gcov to turn on coverage profiling
131 flags and disable optimization
133 2003-02-10 Havoc Pennington <hp@pobox.com>
135 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
136 initial cut at test framework for DBusAuth from laptop.
137 Doesn't quite work yet but it compiles and I need to get
138 it off the 266mhz laptop. ;-)
140 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
141 fix a memleak in error case
143 2003-02-12 Anders Carlsson <andersca@codefactory.se>
146 * bus/desktop-file.c:
147 * bus/desktop-file.h:
148 Add a desktop file parser.
150 2003-02-11 Zack Rusin <zack@kde.org>
152 * qt/message.[h|cpp]: sample implementation
153 of the KDE wrapper for DBusMessage
155 2003-02-09 Zack Rusin <zack@kde.org>
157 * test/bus-test.c: make_it_compile
158 * doc/dbus-specification.sgml: minimal semantic fix
160 2003-02-06 Anders Carlsson <andersca@codefactory.se>
166 2003-02-06 Anders Carlsson <andersca@codefactory.se>
169 * dbus/dbus-break-loader.c:
171 * test/break-loader.c:
172 Move dbus-break-loader to test/ and rename it to break-loader.
174 2003-02-02 Havoc Pennington <hp@pobox.com>
176 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
177 for code to manage cookies in your home directory
179 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
181 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
182 to authenticate, then disconnect the client.
184 2003-02-03 Alexander Larsson <alexl@redhat.com>
186 * dbus/dbus-message.c (dbus_message_append_fields):
189 2003-02-02 Anders Carlsson <andersca@codefactory.se>
191 * doc/dbus-specification.sgml:
192 Update address format section.
194 2003-02-02 Anders Carlsson <andersca@codefactory.se>
197 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
198 (message_handler), (new_connection_callback), (loop_quit),
202 2003-02-02 Anders Carlsson <andersca@codefactory.se>
204 * bus/driver.c: (bus_driver_handle_service_exists):
205 Simplify the code a bit.
207 * dbus/dbus-bus.c: (dbus_bus_service_exists):
210 2003-02-02 Anders Carlsson <andersca@codefactory.se>
213 Add libdbus-daemon.la and link to it.
215 2003-02-01 James Willcox <jwillcox@gnome.org>
217 * bus/driver.c: (bus_driver_handle_own_service):
218 Actually include the service reply code in the message.
220 2003-02-02 Anders Carlsson <andersca@codefactory.se>
222 * bus/driver.c: (bus_driver_handle_service_exists):
223 Don't unref the incoming message.
225 2003-02-02 Anders Carlsson <andersca@codefactory.se>
227 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
229 2003-02-02 Anders Carlsson <andersca@codefactory.se>
231 * dbus/dbus-server.c: (dbus_server_listen):
232 * dbus/dbus-transport.c: (_dbus_transport_open):
233 ifdef out the calls to the debug transport and server.
235 2003-02-02 Alexander Larsson <alexl@redhat.com>
237 * dbus/dbus-watch.c (dbus_watch_get_flags):
238 Add note in the docs that ERROR or HANGUP won't be returned
239 and are assumed always on.
241 * glib/dbus-gmain.c (add_watch):
242 Always add IO_ERR | IO_HUP
244 * dbus/dbus-message.h:
245 Add semicolon after dbus_message_iter_get_string_array().
246 Makes qt code build again
248 2003-02-01 Anders Carlsson <andersca@codefactory.se>
250 * bus/driver.c: (create_unique_client_name),
251 (bus_driver_handle_hello):
252 Don't take a name, just use a numeric id to identify
256 * dbus/dbus-bus.c: (dbus_bus_register_client),
257 (dbus_bus_acquire_service), (dbus_bus_service_exists):
259 Add new convenience functions for communicating with the bus.
261 * dbus/dbus-message.h:
263 * dbus/dbus-protocol.h:
266 2003-02-01 Alexander Larsson <alexl@redhat.com>
268 * dbus/dbus-message.c (dbus_message_append_fields):
269 Add some more doc comments.
271 2003-02-01 Havoc Pennington <hp@pobox.com>
273 * dbus/dbus-break-loader.c (randomly_modify_length): change
274 a 4-byte value in the message as if it were a length
276 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
277 execute bit on saved files
279 2003-02-01 Havoc Pennington <hp@pobox.com>
281 * dbus/dbus-break-loader.c (main): new program to find messages
282 that break the loader.
284 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
285 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
287 * dbus/dbus-string.c (_dbus_string_set_byte): new
289 2003-01-31 Havoc Pennington <hp@pobox.com>
291 * dbus/dbus-message.c: refactor the test code to be more general,
292 in preparation for writing a "randomly permute test cases to
293 try to break the loader" program.
295 2003-01-31 Havoc Pennington <hp@pobox.com>
297 * doc/dbus-specification.sgml: work on the specification
299 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
300 the protocol version of the message.
302 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
303 no longer specifies that.
304 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
307 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
308 "break" for DBUS_TYPE_NIL, remove @todo
310 2003-01-31 Havoc Pennington <hp@pobox.com>
312 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
313 just set_is_error/get_is_error as this is a commonly-used
314 function, and write docs.
316 2003-01-31 Anders Carlsson <andersca@codefactory.se>
318 * dbus/dbus-address.c: (dbus_address_entry_free):
319 Free key and value lists.
321 * dbus/dbus-internals.c: (_dbus_type_to_string):
322 Add the types we didn't have.
324 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
325 (_dbus_marshal_validate_arg):
328 * dbus/dbus-message.c: (dbus_message_set_sender):
329 Remove todo about being able to set sender to NULL.
331 (dbus_message_set_is_error_reply),
332 (dbus_message_get_is_error_reply):
333 * dbus/dbus-message.h:
336 * dbus/dbus-protocol.h:
337 Add error reply flag.
339 * test/data/valid-messages/opposite-endian.message:
340 Add NIL type to test.
342 2003-01-31 Havoc Pennington <hp@pobox.com>
344 * doc/dbus-specification.sgml: fully specify the header. Add
345 flags and major protocol version, and change header/body len to
348 * dbus/dbus-message-builder.c (append_saved_length): append length
351 * dbus/dbus-message.c (dbus_message_create_header): change header
352 length and body length to unsigned. Add the new fields from the
354 (_dbus_message_loader_return_buffer): unsigned header/body len
356 2003-01-30 Havoc Pennington <hp@pobox.com>
358 * dbus/dbus-auth.c: rework to use only REJECTED, no
361 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
362 use REJECTED, suggested by Mark McLoughlin
364 2003-01-30 Havoc Pennington <hp@pobox.com>
366 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
367 a better way to report errors here. e.g. "unix address lacks
368 path" or something. also "no such file" when the path doesn't
371 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
373 (dbus_parse_address): add @todo about documenting address format,
374 and allowing , and ; to be escaped
376 2003-01-30 Anders Carlsson <andersca@codefactory.se>
379 Add dbus-address.[ch]
381 * dbus/dbus-address.c: (dbus_address_entry_free),
382 (dbus_address_entries_free), (create_entry),
383 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
384 (dbus_parse_address), (_dbus_address_test):
385 * dbus/dbus-address.h:
386 New files for dealing with address parsing.
388 * dbus/dbus-connection.c:
389 Document timeout functions.
391 * dbus/dbus-message.c:
392 Document dbus_message_new_from_message.
394 * dbus/dbus-server-debug.c:
397 * dbus/dbus-server.c: (dbus_server_listen):
398 Parse address and use correct server implementation.
400 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
401 * dbus/dbus-string.h:
402 New function with test.
404 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
408 * dbus/dbus-transport-debug.c:
411 * dbus/dbus-transport.c: (_dbus_transport_open):
412 Parse address and use correct transport implementation.
414 2003-01-30 Havoc Pennington <hp@pobox.com>
416 * dbus/dbus-message.c: use message->byte_order instead of
417 DBUS_COMPILER_BYTE_ORDER throughout.
418 (dbus_message_create_header): pad header to align the
419 start of the body of the message to 8-byte boundary
421 * dbus/dbus-marshal.h: make all the demarshalers take const
422 DBusString arguments.
424 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
425 validate message args here, so we don't have to do slow validation
426 later, and so we catch bad messages as they are incoming. Also add
427 better checks on header_len and body_len. Also fill in
430 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
431 implemented properly)
432 (_dbus_string_validate_nul): new function to check all-nul
434 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
435 get_arg_end_pos and remove all validation
436 (_dbus_marshal_validate_arg): actually do validation here.
438 2003-01-29 Havoc Pennington <hp@pobox.com>
440 * dbus/dbus-message.c (check_message_handling): fix assertion
441 failure on set_client_serial
443 2003-01-28 Havoc Pennington <hp@pobox.com>
445 * dbus/dbus-server-debug.c: Add doc section comments
447 * dbus/dbus-transport-debug.c: add doc section comments
449 2003-01-28 Havoc Pennington <hp@redhat.com>
451 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
452 the reverse order from how I had it
453 (_dbus_string_base64_encode): reverse encoding order. I was
454 basically byteswapping everything during encoding.
456 2003-01-28 Anders Carlsson <andersca@codefactory.se>
458 * dbus/dbus-connection-internal.h:
459 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
460 (_dbus_connection_remove_timeout):
461 Add functions for adding and removing timeouts.
463 * dbus/dbus-message.c: (dbus_message_new_from_message):
464 Add new function that takes a message and creates an exact
465 copy of it, but with the refcount set to 1.
466 (check_message_handling):
469 * dbus/dbus-server-protected.h:
470 * dbus/dbus-server.c: (_dbus_server_init_base),
471 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
472 (dbus_server_set_timeout_functions):
473 (_dbus_server_remove_timeout):
474 New functions so that a server can add and remove timeouts.
476 (dbus_server_listen):
477 Add commented out call to dbus_server_debug_new.
479 * dbus/dbus-timeout.c: (_dbus_timeout_new):
480 Actually set the handler, doh.
482 * dbus/dbus-transport.c: (_dbus_transport_open):
483 Add commented out call to dbus_transport_debug_client_new.
486 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
488 2003-01-28 Havoc Pennington <hp@pobox.com>
490 * dbus/dbus-message.c (check_message_handling): function to check
491 on the loaded message, iterates over it etc.
493 2003-01-28 Havoc Pennington <hp@pobox.com>
495 * test/Makefile.am (dist-hook): fix make distdir
497 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
499 2003-01-27 Havoc Pennington <hp@pobox.com>
501 * dbus/dbus-mempool.c (time_for_size): replace printf with
504 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
505 empty lines; fix the SAVE_LENGTH stuff to be
506 START_LENGTH/END_LENGTH so it actually works; couple other
509 * test/Makefile.am (dist-hook): add dist-hook for .message files
511 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
512 can be constant or locked.
513 (_dbus_string_free): allow freeing a const string as
516 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
518 * dbus/dbus-test-main.c (main): take an argument which is the
519 directory containing test data
521 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
522 argument to this and load all the messages in test/data/
523 checking that they can be loaded or not loaded as appropriate.
525 2003-01-27 Anders Carlsson <andersca@codefactory.se>
527 * bus/dispatch.c: (bus_dispatch_message_handler):
528 Dispatch messages sent to services.
530 * bus/driver.c: (bus_driver_send_service_deleted),
531 (bus_driver_send_service_created), (bus_driver_send_service_lost),
532 (bus_driver_send_service_acquired):
533 Add helper functions for sending service related messages.
535 (bus_driver_send_welcome_message):
536 Send HELLO_REPLY instead of WELCOME.
538 (bus_driver_handle_list_services):
539 Send LIST_SERVICES_REPLY instead of SERVICES.
541 (bus_driver_handle_own_service),
542 (bus_driver_handle_service_exists):
543 New message handlers.
545 (bus_driver_handle_message):
546 Invoke new message handlers.
548 (bus_driver_remove_connection):
549 Don't remove any services here since that's done automatically
550 by bus_service_remove_owner now.
553 New function signatures.
555 * bus/services.c: (bus_service_add_owner):
556 Send ServiceAcquired message if we're the only primary owner.
558 (bus_service_remove_owner):
559 Send ServiceAcquired/ServiceLost messages.
561 (bus_service_set_prohibit_replacement),
562 (bus_service_get_prohibit_replacement):
563 Functions for setting prohibit replacement.
565 (bus_service_has_owner):
566 New function that checks if a connection is in the owner queue of
570 Add new function signatures.
572 * dbus/dbus-list.c: (_dbus_list_test):
573 Add tests for _dbus_list_remove_last and traversing the list backwards.
576 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
577 go any further, so return NULL then.
579 * dbus/dbus-protocol.h:
580 Add new messages, service flags and service replies.
582 2003-01-26 Havoc Pennington <hp@pobox.com>
584 * dbus/dbus-message-builder.c: implement, completely untested.
586 * test/data/*: add data to be used in testing.
587 ".message" files are our simple loadable text format.
588 ".message-raw" will be binary dumps of messages.
590 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
592 2003-01-26 Havoc Pennington <hp@pobox.com>
594 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
596 * dbus/dbus-errors.c (dbus_result_to_string): add
599 * dbus/dbus-message-builder.c: new file, will contain code to load
600 up messages from files. Not implemented yet.
602 2003-01-26 Havoc Pennington <hp@pobox.com>
604 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
605 the sender by setting to NULL
607 2003-01-26 Havoc Pennington <hp@pobox.com>
609 The unit tests pass, but otherwise untested. If it breaks, the
610 tests should have been better. ;-)
612 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
615 * dbus/dbus-message.c: redo everything so we maintain
616 message->header as the only copy of the various fields.
617 This avoids the possibility of out-of-memory in some cases,
618 for example dbus_message_lock() can't run out of memory anymore,
619 and avoids extra copying. Figured I may as well go ahead and do
620 this since it was busted for dbus_message_lock to not return
621 failure on OOM, and dbus_message_write_header was totally
622 unchecked for OOM. Also fixed some random other bugs.
624 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
625 that strings are nul-terminated. Also, end_pos can be equal
626 to string length just not greater than, I think.
627 (_dbus_marshal_set_int32): new function
628 (_dbus_marshal_set_uint32): new function
629 (_dbus_marshal_set_string): new function
631 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
632 a warning, init timeout_list to NULL
633 (dbus_connection_send_message): don't use uninitialized variable
636 * dbus/dbus-string.c (_dbus_string_replace_len): new function
638 2003-01-26 Anders Carlsson <andersca@codefactory.se>
640 * bus/driver.c: (bus_driver_handle_hello),
641 (bus_driver_send_welcome_message):
644 2003-01-26 Anders Carlsson <andersca@codefactory.se>
646 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
647 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
648 (dbus_connection_unref):
649 * dbus/dbus-marshal.c: (_dbus_marshal_test):
650 * dbus/dbus-message.c: (dbus_message_unref),
653 (dbus_message_get_fields):
654 Remove debugging printout.
656 (_dbus_message_loader_return_buffer):
657 Don't store the header string.
659 (_dbus_message_test):
662 2003-01-26 Richard Hult <rhult@codefactory.se>
664 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
665 the file descriptor list, since it can change under us.
667 2003-01-25 Anders Carlsson <andersca@codefactory.se>
669 * glib/dbus-gmain.c: (dbus_connection_prepare),
670 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
671 (remove_watch), (dbus_connection_hookup_with_g_main):
672 Rewrite the glib handling to use its own GSource instead of a
673 GIOChannel so we can catch messages put in the queue while waiting
676 2003-01-25 Anders Carlsson <andersca@codefactory.se>
679 * bus/connection.c: (connection_disconnect_handler),
680 (connection_watch_callback), (bus_connection_setup):
681 * bus/dispatch.c: (send_one_message),
682 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
683 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
685 * bus/driver.c: (bus_driver_send_service_deleted),
686 (bus_driver_send_service_created), (bus_driver_handle_hello),
687 (bus_driver_send_welcome_message),
688 (bus_driver_handle_list_services), (bus_driver_remove_connection),
689 (bus_driver_handle_message):
691 Refactor code, put the message dispatching in its own file. Use
692 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
695 2003-01-25 Anders Carlsson <andersca@codefactory.se>
697 * dbus/dbus-internals.h:
698 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
700 * dbus/dbus-message.c: (dbus_message_get_sender):
701 * dbus/dbus-message.h:
702 Implement dbus_message_get_sender.
704 * dbus/dbus-protocol.h:
705 Add message and service defines.
707 2003-01-25 Anders Carlsson <andersca@codefactory.se>
709 * dbus/dbus-connection.c: (dbus_connection_send_message):
710 * dbus/dbus-message-internal.h:
711 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
712 (dbus_message_write_header):
713 Remove _dbus_messag_unlock and don't set the client serial on a
714 message if one already exists.
716 2003-01-24 Havoc Pennington <hp@pobox.com>
718 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
721 * bus/driver.c (bus_driver_handle_list_services): fix a leak
724 2003-01-25 Anders Carlsson <andersca@codefactory.se>
726 * dbus/dbus-list.c: (alloc_link), (free_link):
727 Use a memory pool for the links.
729 2003-01-25 Anders Carlsson <andersca@codefactory.se>
731 * bus/connection.c: (bus_connection_foreach):
733 Add new bus_connection_foreach function.
735 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
736 Add function that broadcasts a message to all clients.
738 (bus_driver_send_service_created), (bus_driver_handle_hello),
739 (bus_driver_send_welcome_message),
740 (bus_driver_handle_list_services), (bus_driver_message_handler):
741 Implement functions that take care of listing services, and notifying
742 clients when new services are created.
744 * bus/services.c: (bus_services_list):
746 Add new function that returns an array of strings with the currently
751 Update copyright year.
753 2003-01-25 Anders Carlsson <andersca@codefactory.se>
755 * dbus/dbus-connection.c: (dbus_connection_send_message):
756 Unlock the message in case it was sent earlier.
758 (dbus_connection_send_message_with_reply_and_block):
759 Remove the reply message from the list.
761 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
762 Set array_len and new_pos correctly.
764 (_dbus_marshal_test):
767 * dbus/dbus-message-internal.h:
768 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
769 New function that returns the reply serial.
771 (_dbus_message_unlock):
772 New function that unlocks a message and resets its header.
774 (dbus_message_append_string_array),
775 (dbus_message_get_fields_valist),
776 (dbus_message_iter_get_field_type),
777 (dbus_message_iter_get_string_array),
778 (dbus_message_get_fields),
779 (dbus_message_append_fields_valist):
780 Handle string arrays.
782 (dbus_message_set_sender):
783 Make this function public since the bus daemon needs it.
785 (decode_header_data):
786 Set the reply serial to -1 initially.
788 * dbus/dbus-message.h:
789 Add dbus_message_set_sender.
791 2003-01-24 Havoc Pennington <hp@pobox.com>
793 * doc/dbus-specification.sgml: add some stuff
795 2003-01-22 Havoc Pennington <hp@pobox.com>
797 * doc/dbus-specification.sgml: Start to document the protocol.
799 2003-01-22 Havoc Pennington <hp@pobox.com>
801 * dbus/dbus-connection.c
802 (dbus_connection_send_message_with_reply_and_block): add some @todo
804 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
806 2003-01-21 Havoc Pennington <hp@pobox.com>
808 (patch untested because can't compile)
810 * bus/driver.c (create_unique_client_name): make this function
811 never recycle client names. Also, caller should initialize
814 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
816 2003-01-21 Anders Carlsson <andersca@codefactory.se>
818 * dbus/dbus-marshal.c: (_dbus_marshal_double),
819 (_dbus_marshal_int32), (_dbus_marshal_uint32),
820 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
821 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
822 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
823 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
824 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
825 * dbus/dbus-marshal.h:
826 * dbus/dbus-protocol.h:
827 Add support for marshalling and demarshalling integer, double
830 2003-01-21 Anders Carlsson <andersca@codefactory.se>
835 * bus/connection.c: (connection_disconnect_handler):
836 Remove the connection from the bus driver's list.
838 (connection_watch_callback): Dispatch messages.
840 (free_connection_data): Free connection name.
842 (bus_connection_setup): Add connection to the bus driver's list.
843 (bus_connection_remove_owned_service):
844 (bus_connection_set_name), (bus_connection_get_name):
845 Add functions for setting and getting the connection's name.
848 Add function headers.
850 * bus/driver.c: (create_unique_client_name),
851 (bus_driver_handle_hello_message),
852 (bus_driver_send_welcome_message), (bus_driver_message_handler),
853 (bus_driver_add_connection), (bus_driver_remove_connection):
856 * bus/services.c: (bus_service_free):
858 New file that handles communication and registreation with the bus
861 2003-01-21 Anders Carlsson <andersca@codefactory.se>
863 * dbus/dbus-connection.c: (dbus_connection_send_message):
864 Add a new client_serial parameter.
866 (dbus_connection_send_message_with_reply):
867 Remove a @todo since we've implemented the blocking function.
869 (dbus_connection_send_message_with_reply_and_block):
870 New function that sends a message and waits for a reply and
871 then returns the reply.
873 * dbus/dbus-connection.h:
876 * dbus/dbus-errors.c: (dbus_result_to_string):
877 * dbus/dbus-errors.h:
880 * dbus/dbus-message-internal.h:
881 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
882 (_dbus_message_set_sender), (dbus_message_write_header),
883 (dbus_message_new_reply), (decode_header_data),
884 (_dbus_message_loader_return_buffer), (_dbus_message_test):
885 * dbus/dbus-message.h:
886 Add new functions that set the reply serial and sender.
887 Also marshal and demarshal them correctly and add test.
889 * dbus/dbus-protocol.h:
890 Add new DBUS_MESSAGE_TYPE_SENDER.
893 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
894 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
895 (dbus_connection_hookup_with_g_main):
896 * glib/test-dbus-glib.c: (main):
897 Rewrite to use GIOChannel and remove the GSource crack.
899 * test/echo-client.c: (main):
900 * test/watch.c: (check_messages):
901 Update for changed APIs
903 2003-01-19 Anders Carlsson <andersca@codefactory.se>
905 * dbus/Makefile.am: Add dbus-timeout.[cħ]
907 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
908 Create a DBusTimeoutList.
909 (dbus_connection_set_timeout_functions): Add new function to
910 set timeout callbacks
912 * dbus/dbus-connection.h: Add public DBusTimeout API.
914 * dbus/dbus-message.c: (dbus_message_get_service):
915 * dbus/dbus-message.h: New function.
917 * dbus/dbus-server.c: Fix small doc typo.
919 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
921 2003-01-19 Anders Carlsson <andersca@codefactory.se>
923 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
924 of the string, just as long as specified.
926 2003-01-19 Havoc Pennington <hp@pobox.com>
928 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
931 * dbus/dbus-server.c (dbus_server_set_max_connections)
932 (dbus_server_get_max_connections, dbus_server_get_n_connections):
933 keep track of current number of connections, and add API for
934 setting a max (but haven't implemented enforcing the max yet)
936 2003-01-18 Havoc Pennington <hp@pobox.com>
938 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
939 reading/writing if read_watch != NULL or write_watch != NULL.
941 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
942 the message loader code to actually load message->header and
943 message->body into the newly-created message.
945 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
948 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
949 (dbus_connection_get_max_message_size)
950 (dbus_connection_set_max_live_messages_size)
951 (dbus_connection_get_max_live_messages_size): implement some
952 resource limitation functions
954 * dbus/dbus-resources.c: new file implementing some of the
955 resource limits stuff
957 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
958 missing docs, add @todo to handle OOM etc.
960 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
963 2003-01-18 Havoc Pennington <hp@pobox.com>
965 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
966 connection if it hasn't been already.
968 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
969 replace with DisconnectFunction.
971 2003-01-18 Havoc Pennington <hp@pobox.com>
973 Building --disable-verbose-mode --disable-asserts --disable-tests
974 cuts the library from 112K to 45K or so
976 * configure.in: check for varargs macro support,
977 add --enable-verbose-mode, --enable-asserts.
979 * dbus/dbus-internals.h (_dbus_assert): support
981 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
983 2003-01-18 Havoc Pennington <hp@pobox.com>
985 * dbus/dbus-test.c: include config.h so that tests actually run
987 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
988 so the failure mode when that assumption fails will be plenty
991 2003-01-18 Havoc Pennington <hp@pobox.com>
993 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
995 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
998 * test/Makefile.am: don't use special variable "TESTS" for echo-*
999 since we don't want to use those in make check
1001 2003-01-15 Havoc Pennington <hp@redhat.com>
1007 2003-01-15 Havoc Pennington <hp@redhat.com>
1009 * test/Makefile.am: fix so that test source code ends up in the
1010 distribution on make distcheck
1012 2003-01-15 Havoc Pennington <hp@redhat.com>
1018 2003-01-15 Havoc Pennington <hp@redhat.com>
1020 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
1021 fix build when --disable-tests
1023 * Makefile.am (EXTRA_DIST): put HACKING in here
1025 * HACKING: document procedure for making a tarball release.
1027 2003-01-14 Anders Carlsson <andersca@codefactory.se>
1029 * bus/connection.c: (connection_error_handler),
1030 (bus_connection_setup):
1031 * bus/main.c: (main):
1032 Make sure that the DBusConnectionData struct is NULLed
1033 out to prevent a segfault.
1035 * dbus/dbus-errors.c: (dbus_result_to_string):
1036 * dbus/dbus-errors.h:
1037 * dbus/dbus-message.c: (dbus_message_get_fields),
1038 (dbus_message_get_fields_valist), (_dbus_message_test):
1039 * dbus/dbus-message.h:
1040 Make dbus_message_get_fields return a result code so we can
1041 track invalid fields as well as oom.
1043 2003-01-11 Havoc Pennington <hp@pobox.com>
1045 * configure.in: change --enable-test/--enable-ansi action-if-given
1046 to enable_foo=$enableval instead of enable_foo=yes
1048 2003-01-08 Havoc Pennington <hp@pobox.com>
1050 * dbus/dbus-string.c (_dbus_string_align_length): new function
1052 * dbus/dbus-test-main.c: move main() for test app here
1054 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
1055 symbol to run tests, because dbus-test isn't in the main
1058 Code review nitpicks.
1060 * dbus/dbus-message.c (dbus_message_write_header): add newlines
1061 for people with narrow emacs ;-). Assert client_serial was filled
1062 in. Assert message->name != NULL.
1063 (dbus_message_append_fields): have "first_field_type" arg separate
1064 from va list, needed for C++ binding that also uses varargs IIRC
1065 and helps with type safety
1066 (dbus_message_new): add @todo about using DBusString to store
1067 service/name internally
1068 (dbus_message_new): don't leak ->service and ->name on OOM later
1070 (dbus_message_unref): free the service name
1071 (dbus_message_get_fields): same change to varargs
1072 i.e. first_field_type
1073 (_dbus_message_loader_return_buffer): assert that the message data
1074 is aligned (if not it's a bug in our code). Put in verbose griping
1075 about why we set corrupted = TRUE.
1076 (decode_header_data): add FIXME that char* is evil. Was going to
1077 add FIXME about evil locale-specific string.h strncmp, but just
1078 switched to wacky string-as-uint32 optimization. Move check for
1079 "no room for field name" above get_const_data_len() to avoid
1080 assertion failure in get_const_data_len if we have trailing 2
1081 bytes or the like. Check for service and name fields being
1082 provided twice. Don't leak service/name on error. Require field
1083 names to be aligned to 4 bytes.
1085 * dbus/dbus-marshal.c: move byte swap stuff to header
1086 (_dbus_pack_int32): uscore-prefix
1087 (_dbus_unpack_int32): uscore-prefix
1088 (_dbus_unpack_uint32): export
1089 (_dbus_demarshal_string): add @todo complaining about use of
1091 (_dbus_marshal_get_field_end_pos): add @todo about bad error
1092 handling allowing corrupt data to go unchecked
1094 2003-01-08 Havoc Pennington <hp@redhat.com>
1096 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
1097 to the select() as needed for authentication. (should be using
1098 _dbus_poll() not select, but for another day)
1100 * dbus/dbus.h: include dbus/dbus-protocol.h
1102 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1104 * dbus/Makefile.am (dbusinclude_HEADERS): Install
1107 2003-01-08 Anders Carlsson <andersca@codefactory.se>
1109 * dbus/dbus-internals.c: (_dbus_type_to_string):
1110 New function that returns a string describing a type.
1112 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
1113 * dbus/dbus-marshal.h:
1114 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
1115 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
1116 (dbus_message_iter_get_byte_array):
1117 * dbus/dbus-message.h:
1118 Add new convenience functions for appending and getting message fields.
1119 Also add demarshalling routines for byte arrays.
1121 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1123 * dbus/dbus-connection-internal.h:
1124 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1125 (_dbus_connection_get_next_client_serial),
1126 (dbus_connection_send_message):
1127 * dbus/dbus-internals.h:
1128 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1129 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1130 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1131 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1132 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1133 (_dbus_verbose_bytes), (_dbus_marshal_test):
1134 * dbus/dbus-marshal.h:
1135 * dbus/dbus-message-internal.h:
1136 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1137 (dbus_message_write_header), (_dbus_message_lock),
1138 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1139 (dbus_message_get_name), (dbus_message_append_int32),
1140 (dbus_message_append_uint32), (dbus_message_append_double),
1141 (dbus_message_append_string), (dbus_message_append_byte_array),
1142 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1143 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1144 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1145 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1146 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1147 (decode_header_data), (_dbus_message_loader_return_buffer),
1148 (message_iter_test), (_dbus_message_test):
1149 * dbus/dbus-message.h:
1150 * dbus/dbus-protocol.h:
1151 * dbus/dbus-test.c: (main):
1153 * glib/test-dbus-glib.c: (message_handler), (main):
1154 * test/echo-client.c: (main):
1155 * test/watch.c: (check_messages):
1156 Make messages sendable and receivable for real.
1158 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1160 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1161 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1162 * dbus/dbus-message.c: (dbus_message_append_int32),
1163 (dbus_message_append_uint32), (dbus_message_append_double),
1164 (dbus_message_append_string), (dbus_message_append_byte_array):
1165 Handle OOM restoration.
1167 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1169 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1170 (_dbus_demarshal_string), (_dbus_marshal_test):
1171 * dbus/dbus-marshal.h:
1172 * dbus/dbus-message.c: (dbus_message_get_name),
1173 Document these functions.
1175 (dbus_message_append_int32), (dbus_message_append_uint32),
1176 (dbus_message_append_double), (dbus_message_append_string),
1177 (dbus_message_append_byte_array):
1178 * dbus/dbus-message.h:
1179 Add functions for adding message fields of different types.
1181 * dbus/dbus-protocol.h:
1182 Add the different types.
1184 2003-01-05 Havoc Pennington <hp@pobox.com>
1186 * bus/connection.c: implement routines for handling connections,
1187 first thing is keeping a list of owned services on each connection
1188 and setting up watches etc.
1190 * bus/services.c: implement a mapping from service names to lists
1193 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1195 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1196 to use static mutexes for global data
1198 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1199 collection of functions to set/get application-specific data
1200 on the DBusConnection.
1202 2003-01-04 Havoc Pennington <hp@pobox.com>
1204 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1205 (_dbus_poll): new function
1207 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1210 * bus/loop.c: initial code for the daemon main loop
1212 2003-01-04 Havoc Pennington <hp@pobox.com>
1214 * test/watch.c (error_handler): make it safe if the error handler
1215 is called multiple times (if we s/error handler/disconnect
1216 handler/ we should just guarantee it's called only once)
1218 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1219 error handler on disconnect (it's quite possible we should
1220 just change the error handler to a "disconnect handler," I'm
1221 not sure we have any other meaningful errors)
1223 * configure.in: check for getpwnam_r
1225 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1226 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1227 mechanism as in SASL spec, using socket credentials
1229 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1230 (_dbus_send_credentials_unix_socket): new function
1232 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1234 (_dbus_write): only check errno if <0 returned
1235 (_dbus_write_two): ditto
1237 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1239 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1240 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1241 (_dbus_marshal_test):
1242 * dbus/dbus-marshal.h:
1243 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1244 to _dbus_marshal_utf8_string. Also fix some tests.
1246 2002-12-28 Harri Porten <porten@kde.org>
1248 * configure.in: added check for C++ compiler and a very cheesy
1249 check for the Qt integration
1251 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1253 * qt/Makefile.am: added
1255 * qt/.cvsignore: added
1257 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1258 latter, added #ifdef QT_THREAD_SUPPORT guard.
1260 * dbus/Makefile.am: added missing headers for make dist
1262 2002-12-28 Kristian Rietveld <kris@gtk.org>
1264 * dbus/Makefile.am: fixup export-symbols-regex.
1266 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1268 * acinclude.m4: Add this file and put the
1269 PKG_CHECK_MODULE macro in it.
1271 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1273 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1274 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1275 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1276 (_dbus_marshal_test):
1277 Make the demarshalling routines align the pos argument.
1278 Add string marshalling tests and fix the obvious bugs
1281 2002-12-26 Havoc Pennington <hp@pobox.com>
1283 * dbus/dbus-auth.c: fixes fixes fixes
1285 * dbus/dbus-transport-unix.c: wire up support for
1286 encoding/decoding data on the wire
1288 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1289 (_dbus_auth_decode_data): append to target string
1290 instead of nuking it.
1292 2002-12-26 Havoc Pennington <hp@pobox.com>
1294 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1295 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1298 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1299 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1300 now). Main point is because I wanted unpack_uint32 to implement
1302 (_dbus_verbose_bytes): new function
1304 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1306 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1307 mechanism to handle a corrupt message stream
1308 (_dbus_message_loader_new): fix preallocation to only prealloc,
1311 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1312 (_dbus_string_test): enhance tests for copy/move and fix the
1315 * dbus/dbus-transport-unix.c: Hold references in more places to
1316 avoid reentrancy problems
1318 * dbus/dbus-transport.c: ditto
1320 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1321 leak reference count in no-message case
1323 * test/watch.c (do_mainloop): handle adding/removing watches
1324 during iteration over the watches. Also, ref the connection/server
1325 stored on a watch, so we don't try to mangle a destroyed one.
1327 * dbus/dbus-transport-unix.c (do_authentication): perform
1330 * dbus/dbus-auth.c (get_state): add a state
1331 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1332 (_dbus_auth_get_unused_bytes): append the unused bytes
1333 to the passed in string, rather than prepend
1335 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1336 the auth conversation DBusAuth
1338 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1339 (_dbus_transport_new_for_domain_socket): when creating a
1340 transport, pass in whether it's a client-side or server-side
1341 transport so we know which DBusAuth to create
1343 2002-12-03 Havoc Pennington <hp@pobox.com>
1345 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1346 _after_ finalizing the derived members
1347 (unix_connection_set): unref watch if we fail to add it
1349 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1350 transport first, so that the connection owned by the
1351 transport will be valid as the transport finalizes.
1353 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1354 if necessary, and remove watches from the connection.
1356 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1358 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1360 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1361 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1362 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1363 (_dbus_marshal_test):
1364 * dbus/dbus-marshal.h:
1365 Add string marshal functions and have the demarshal functions
1366 return the new position.
1368 2002-12-25 Havoc Pennington <hp@pobox.com>
1370 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1371 it is a simple protocol that just maps directly to SASL.
1373 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1374 initial implementation, not actually used yet.
1376 * dbus/dbus-string.c (_dbus_string_find): new function
1377 (_dbus_string_equal): new function
1378 (_dbus_string_base64_encode): new function
1379 (_dbus_string_base64_decode): new function
1381 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1384 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1385 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1386 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1387 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1388 * dbus/dbus-marshal.h:
1389 * dbus/dbus-protocol.h:
1390 * dbus/dbus-test.c: (main):
1392 Add un-optimized marshalling/demarshalling routines.
1394 2002-12-25 Harri Porten <porten@kde.org>
1396 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1398 2002-12-24 Zack Rusin <zack@kde.org>
1400 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1401 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1404 2002-12-24 Havoc Pennington <hp@pobox.com>
1406 * glib/dbus-gthread.c: fix include
1408 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1409 I think glib API needs to change, though, as you don't
1410 want to use DBusMessageFunction, you want to use the
1411 DBusMessageHandler object. Probably
1412 dbus_connection_open_with_g_main_loop()
1413 and dbus_connection_setup_g_main_loop() or something like that
1414 (but think of better names...) that just create a connection
1415 that has watch/timeout functions etc. already set up.
1417 * dbus/dbus-connection.c
1418 (dbus_connection_send_message_with_reply): new function just to
1419 show how the message handler helps us deal with replies.
1421 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1423 * dbus/dbus-string.c (_dbus_string_test): free a string that
1426 * dbus/dbus-hash.c: use memory pools for the hash entries
1427 (rebuild_table): be more paranoid about overflow, and
1428 shrink table when we can
1429 (_dbus_hash_test): reduce number of sprintfs and write
1430 valid C89. Add tests for case where we grow and then
1431 shrink the hash table.
1433 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1435 * dbus/dbus-connection.c (dbus_connection_register_handler)
1436 (dbus_connection_unregister_handler): new functions
1438 * dbus/dbus-message.c (dbus_message_get_name): new
1440 * dbus/dbus-list.c: fix docs typo
1442 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1443 an object representing a handler for messages.
1445 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1448 * glib/dbus-gthread.c: (dbus_gthread_init):
1449 Don't use the gdbus prefix for public functions.
1451 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1455 Add GLib checks and fixup .pc files
1459 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1460 (gdbus_connection_check), (gdbus_connection_dispatch),
1461 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1462 (dbus_connection_gsource_new):
1463 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1464 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1465 * glib/test-dbus-glib.c: (message_handler), (main):
1468 2002-12-15 Harri Porten <porten@kde.org>
1470 * autogen.sh: check for libtoolize before attempting to use it
1472 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1475 * .cvsignore: ignore more stamp files
1477 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1479 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1480 without make install.
1482 2002-12-15 Havoc Pennington <hp@pobox.com>
1484 * dbus/dbus-threads.c: add thread stubs that a higher library
1485 layer can fill in. e.g. the GLib wrapper might fill them in with
1486 GThread stuff. We still need to use this thread API to
1487 thread-safe-ize the library.
1489 2002-12-12 Havoc Pennington <hp@pobox.com>
1491 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1492 below new interfaces and include fewer system headers.
1494 * dbus/dbus-sysdeps.c (_dbus_read): new function
1495 (_dbus_write): new function
1496 (_dbus_write_two): new function
1497 (_dbus_connect_unix_socket): new function
1498 (_dbus_listen_unix_socket): new function
1500 * dbus/dbus-message-internal.h: change interfaces to use
1503 2002-12-11 Havoc Pennington <hp@pobox.com>
1505 * dbus/dbus-types.h: add dbus_unichar
1507 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1509 * dbus/dbus-connection.c (dbus_connection_send_message): return
1512 * dbus/dbus-transport.c: include dbus-watch.h
1514 * dbus/dbus-connection.c: include dbus-message-internal.h
1516 * HACKING: add file with coding guidelines stuff.
1518 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1519 handling here, for security purposes (as in vsftpd). Not actually
1520 using this class yet.
1522 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1523 system/libc usage here, as in vsftpd, for ease of auditing (and
1524 should also simplify portability). Haven't actually moved all the
1525 system/libc usage into here yet.
1527 2002-11-25 Havoc Pennington <hp@pobox.com>
1529 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1530 always print the first verbose message.
1532 2002-11-24 Havoc Pennington <hp@pobox.com>
1534 * test/echo-client.c, test/echo-server.c: cheesy test
1537 * configure.in (AC_CHECK_FUNCS): check for writev
1539 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1542 * dbus/dbus-list.c (_dbus_list_foreach): new function
1544 * dbus/dbus-internals.c (_dbus_verbose): new function
1546 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1547 representing a server that listens for connections.
1549 * dbus/.cvsignore: create
1551 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1552 public API for reporting errors
1554 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1555 public object representing a connection that
1556 sends/receives messages. (Same object used for
1557 both client and server.)
1559 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1560 Basic abstraction for different kinds of stream
1561 that we might read/write messages from.
1563 2002-11-23 Havoc Pennington <hp@pobox.com>
1565 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1568 * dbus/dbus-test.c (main): add list test, and include
1569 dbus-test.h as intended
1571 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1572 (_dbus_hash_table_remove_int): return value indicates
1573 whether the entry existed to remove
1575 * dbus/dbus-list.c: add linked list utility class,
1578 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1581 2002-11-23 Havoc Pennington <hp@pobox.com>
1583 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1584 DBUS_END_DECLS to nothing, that should fix this once and for all
1586 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1588 * dbus/dbus-message.c, dbus/dbus-hash.c:
1589 add some missing @brief
1591 2002-11-23 Havoc Pennington <hp@pobox.com>
1593 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1594 to avoid confusing Doxygen
1596 * dbus/dbus-hash.c: @} not }@
1598 * dbus/dbus-message.c (struct DBusMessage): split out
1601 2002-11-23 Havoc Pennington <hp@pobox.com>
1603 * configure.in: pile on more warning flags if using gcc
1605 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1606 to document static functions
1608 * configure.in: add summary to end of configure so it
1609 looks nice and attractive
1611 * dbus/dbus-hash.c: finish implementation and write unit
1614 * configure.in: add --enable-tests to enable unit tests
1616 * dbus/dbus-test.c: test program to run unit tests
1617 for all files in dbus/*, initially runs a test for
1620 * dbus/dbus-internals.h: file to hold some internal utility stuff
1622 2002-11-22 Havoc Pennington <hp@redhat.com>
1624 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1625 "ported" away from Tcl
1627 * dbus/dbus-types.h: header for types such as dbus_bool_t
1629 2002-11-22 Havoc Pennington <hp@redhat.com>
1631 * dbus/dbus.h: fixups for doc warnings
1633 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1635 (QUIET): make it quiet so we can see warnings
1637 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1639 2002-11-22 Havoc Pennington <hp@redhat.com>
1641 * Makefile.am: include "Doxyfile" target in all-local
1643 * configure.in: generate the Doxyfile
1645 * Doxyfile.in: move Doxyfile here, so we can use
1646 configure to generate a Doxyfile with the right
1649 2002-11-22 Havoc Pennington <hp@redhat.com>
1651 * dbus/dbus-message.c: move inline docs into .c file
1653 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1654 so all docs are under doc/
1655 (MAN_EXTENSION): generate man pages. Use extension
1656 ".3dbus" which matches ".3qt" on my system,
1657 I guess this is OK, I don't know really.
1658 (FILE_PATTERNS): look for .c files not .h, makes sense
1661 2002-11-22 Havoc Pennington <hp@pobox.com>
1663 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1664 because any app can be a server, and any app can be a client,
1665 the bus is a special kind of server.
1667 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1669 * Doxyfile : adding. Still needs Makefile rules to be generated
1670 automatically (just run "doxygen" in the toplevel dir for now to
1673 * dbus/dbus-message.h : Adding sample docs (javadoc since
1674 resembles gtk-doc a little more)
1676 * dbus/dbus.h : Adding sample docs
1678 2002-11-21 Havoc Pennington <hp@redhat.com>
1680 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1681 so we can allow ourselves to include files directly,
1682 instead of having to use dbus.h
1684 * dbus/dbus.h: fill in
1686 * dbus/dbus-message.h: sketch out a sample header file.
1687 Include griping if you include it directly instead of
1690 * dbus/dbus-macros.h: new file with macros for extern "C",
1691 TRUE/FALSE, NULL, etc.
1693 * doc/file-boilerplate.c: put include guards in here
1695 2002-11-21 Havoc Pennington <hp@redhat.com>
1697 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1699 * COPYING: include the GPL as well, and license code
1700 under both AFL and GPL.
1702 2002-11-21 Havoc Pennington <hp@redhat.com>
1704 * acconfig.h: get rid of this
1706 * autogen.sh (run_configure): add --no-configure option
1708 * configure.in: remove AC_ARG_PROGRAM to make
1709 autoconf complain less. add AC_PREREQ.
1710 add AC_DEFINE third arg.
1712 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1715 Fix references so we can distcheck.
1717 2002-11-21 Havoc Pennington <hp@redhat.com>
1719 * Initial module creation