1 2003-02-12 Havoc Pennington <hp@pobox.com>
3 * dbus/Makefile.am: remove break-loader from the build, since it
6 * configure.in: add --enable-gcov to turn on coverage profiling
7 flags and disable optimization
9 2003-02-10 Havoc Pennington <hp@pobox.com>
11 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
12 initial cut at test framework for DBusAuth from laptop.
13 Doesn't quite work yet but it compiles and I need to get
14 it off the 266mhz laptop. ;-)
16 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
17 fix a memleak in error case
19 2003-02-12 Anders Carlsson <andersca@codefactory.se>
24 Add a desktop file parser.
26 2003-02-11 Zack Rusin <zack@kde.org>
28 * qt/message.[h|cpp]: sample implementation
29 of the KDE wrapper for DBusMessage
31 2003-02-09 Zack Rusin <zack@kde.org>
33 * test/bus-test.c: make_it_compile
34 * doc/dbus-specification.sgml: minimal semantic fix
36 2003-02-06 Anders Carlsson <andersca@codefactory.se>
42 2003-02-06 Anders Carlsson <andersca@codefactory.se>
45 * dbus/dbus-break-loader.c:
47 * test/break-loader.c:
48 Move dbus-break-loader to test/ and rename it to break-loader.
50 2003-02-02 Havoc Pennington <hp@pobox.com>
52 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
53 for code to manage cookies in your home directory
55 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
57 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
58 to authenticate, then disconnect the client.
60 2003-02-03 Alexander Larsson <alexl@redhat.com>
62 * dbus/dbus-message.c (dbus_message_append_fields):
65 2003-02-02 Anders Carlsson <andersca@codefactory.se>
67 * doc/dbus-specification.sgml:
68 Update address format section.
70 2003-02-02 Anders Carlsson <andersca@codefactory.se>
73 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
74 (message_handler), (new_connection_callback), (loop_quit),
78 2003-02-02 Anders Carlsson <andersca@codefactory.se>
80 * bus/driver.c: (bus_driver_handle_service_exists):
81 Simplify the code a bit.
83 * dbus/dbus-bus.c: (dbus_bus_service_exists):
86 2003-02-02 Anders Carlsson <andersca@codefactory.se>
89 Add libdbus-daemon.la and link to it.
91 2003-02-01 James Willcox <jwillcox@gnome.org>
93 * bus/driver.c: (bus_driver_handle_own_service):
94 Actually include the service reply code in the message.
96 2003-02-02 Anders Carlsson <andersca@codefactory.se>
98 * bus/driver.c: (bus_driver_handle_service_exists):
99 Don't unref the incoming message.
101 2003-02-02 Anders Carlsson <andersca@codefactory.se>
103 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
105 2003-02-02 Anders Carlsson <andersca@codefactory.se>
107 * dbus/dbus-server.c: (dbus_server_listen):
108 * dbus/dbus-transport.c: (_dbus_transport_open):
109 ifdef out the calls to the debug transport and server.
111 2003-02-02 Alexander Larsson <alexl@redhat.com>
113 * dbus/dbus-watch.c (dbus_watch_get_flags):
114 Add note in the docs that ERROR or HANGUP won't be returned
115 and are assumed always on.
117 * glib/dbus-gmain.c (add_watch):
118 Always add IO_ERR | IO_HUP
120 * dbus/dbus-message.h:
121 Add semicolon after dbus_message_iter_get_string_array().
122 Makes qt code build again
124 2003-02-01 Anders Carlsson <andersca@codefactory.se>
126 * bus/driver.c: (create_unique_client_name),
127 (bus_driver_handle_hello):
128 Don't take a name, just use a numeric id to identify
132 * dbus/dbus-bus.c: (dbus_bus_register_client),
133 (dbus_bus_acquire_service), (dbus_bus_service_exists):
135 Add new convenience functions for communicating with the bus.
137 * dbus/dbus-message.h:
139 * dbus/dbus-protocol.h:
142 2003-02-01 Alexander Larsson <alexl@redhat.com>
144 * dbus/dbus-message.c (dbus_message_append_fields):
145 Add some more doc comments.
147 2003-02-01 Havoc Pennington <hp@pobox.com>
149 * dbus/dbus-break-loader.c (randomly_modify_length): change
150 a 4-byte value in the message as if it were a length
152 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
153 execute bit on saved files
155 2003-02-01 Havoc Pennington <hp@pobox.com>
157 * dbus/dbus-break-loader.c (main): new program to find messages
158 that break the loader.
160 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
161 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
163 * dbus/dbus-string.c (_dbus_string_set_byte): new
165 2003-01-31 Havoc Pennington <hp@pobox.com>
167 * dbus/dbus-message.c: refactor the test code to be more general,
168 in preparation for writing a "randomly permute test cases to
169 try to break the loader" program.
171 2003-01-31 Havoc Pennington <hp@pobox.com>
173 * doc/dbus-specification.sgml: work on the specification
175 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
176 the protocol version of the message.
178 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
179 no longer specifies that.
180 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
183 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
184 "break" for DBUS_TYPE_NIL, remove @todo
186 2003-01-31 Havoc Pennington <hp@pobox.com>
188 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
189 just set_is_error/get_is_error as this is a commonly-used
190 function, and write docs.
192 2003-01-31 Anders Carlsson <andersca@codefactory.se>
194 * dbus/dbus-address.c: (dbus_address_entry_free):
195 Free key and value lists.
197 * dbus/dbus-internals.c: (_dbus_type_to_string):
198 Add the types we didn't have.
200 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
201 (_dbus_marshal_validate_arg):
204 * dbus/dbus-message.c: (dbus_message_set_sender):
205 Remove todo about being able to set sender to NULL.
207 (dbus_message_set_is_error_reply),
208 (dbus_message_get_is_error_reply):
209 * dbus/dbus-message.h:
212 * dbus/dbus-protocol.h:
213 Add error reply flag.
215 * test/data/valid-messages/opposite-endian.message:
216 Add NIL type to test.
218 2003-01-31 Havoc Pennington <hp@pobox.com>
220 * doc/dbus-specification.sgml: fully specify the header. Add
221 flags and major protocol version, and change header/body len to
224 * dbus/dbus-message-builder.c (append_saved_length): append length
227 * dbus/dbus-message.c (dbus_message_create_header): change header
228 length and body length to unsigned. Add the new fields from the
230 (_dbus_message_loader_return_buffer): unsigned header/body len
232 2003-01-30 Havoc Pennington <hp@pobox.com>
234 * dbus/dbus-auth.c: rework to use only REJECTED, no
237 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
238 use REJECTED, suggested by Mark McLoughlin
240 2003-01-30 Havoc Pennington <hp@pobox.com>
242 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
243 a better way to report errors here. e.g. "unix address lacks
244 path" or something. also "no such file" when the path doesn't
247 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
249 (dbus_parse_address): add @todo about documenting address format,
250 and allowing , and ; to be escaped
252 2003-01-30 Anders Carlsson <andersca@codefactory.se>
255 Add dbus-address.[ch]
257 * dbus/dbus-address.c: (dbus_address_entry_free),
258 (dbus_address_entries_free), (create_entry),
259 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
260 (dbus_parse_address), (_dbus_address_test):
261 * dbus/dbus-address.h:
262 New files for dealing with address parsing.
264 * dbus/dbus-connection.c:
265 Document timeout functions.
267 * dbus/dbus-message.c:
268 Document dbus_message_new_from_message.
270 * dbus/dbus-server-debug.c:
273 * dbus/dbus-server.c: (dbus_server_listen):
274 Parse address and use correct server implementation.
276 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
277 * dbus/dbus-string.h:
278 New function with test.
280 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
284 * dbus/dbus-transport-debug.c:
287 * dbus/dbus-transport.c: (_dbus_transport_open):
288 Parse address and use correct transport implementation.
290 2003-01-30 Havoc Pennington <hp@pobox.com>
292 * dbus/dbus-message.c: use message->byte_order instead of
293 DBUS_COMPILER_BYTE_ORDER throughout.
294 (dbus_message_create_header): pad header to align the
295 start of the body of the message to 8-byte boundary
297 * dbus/dbus-marshal.h: make all the demarshalers take const
298 DBusString arguments.
300 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
301 validate message args here, so we don't have to do slow validation
302 later, and so we catch bad messages as they are incoming. Also add
303 better checks on header_len and body_len. Also fill in
306 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
307 implemented properly)
308 (_dbus_string_validate_nul): new function to check all-nul
310 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
311 get_arg_end_pos and remove all validation
312 (_dbus_marshal_validate_arg): actually do validation here.
314 2003-01-29 Havoc Pennington <hp@pobox.com>
316 * dbus/dbus-message.c (check_message_handling): fix assertion
317 failure on set_client_serial
319 2003-01-28 Havoc Pennington <hp@pobox.com>
321 * dbus/dbus-server-debug.c: Add doc section comments
323 * dbus/dbus-transport-debug.c: add doc section comments
325 2003-01-28 Havoc Pennington <hp@redhat.com>
327 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
328 the reverse order from how I had it
329 (_dbus_string_base64_encode): reverse encoding order. I was
330 basically byteswapping everything during encoding.
332 2003-01-28 Anders Carlsson <andersca@codefactory.se>
334 * dbus/dbus-connection-internal.h:
335 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
336 (_dbus_connection_remove_timeout):
337 Add functions for adding and removing timeouts.
339 * dbus/dbus-message.c: (dbus_message_new_from_message):
340 Add new function that takes a message and creates an exact
341 copy of it, but with the refcount set to 1.
342 (check_message_handling):
345 * dbus/dbus-server-protected.h:
346 * dbus/dbus-server.c: (_dbus_server_init_base),
347 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
348 (dbus_server_set_timeout_functions):
349 (_dbus_server_remove_timeout):
350 New functions so that a server can add and remove timeouts.
352 (dbus_server_listen):
353 Add commented out call to dbus_server_debug_new.
355 * dbus/dbus-timeout.c: (_dbus_timeout_new):
356 Actually set the handler, doh.
358 * dbus/dbus-transport.c: (_dbus_transport_open):
359 Add commented out call to dbus_transport_debug_client_new.
362 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
364 2003-01-28 Havoc Pennington <hp@pobox.com>
366 * dbus/dbus-message.c (check_message_handling): function to check
367 on the loaded message, iterates over it etc.
369 2003-01-28 Havoc Pennington <hp@pobox.com>
371 * test/Makefile.am (dist-hook): fix make distdir
373 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
375 2003-01-27 Havoc Pennington <hp@pobox.com>
377 * dbus/dbus-mempool.c (time_for_size): replace printf with
380 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
381 empty lines; fix the SAVE_LENGTH stuff to be
382 START_LENGTH/END_LENGTH so it actually works; couple other
385 * test/Makefile.am (dist-hook): add dist-hook for .message files
387 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
388 can be constant or locked.
389 (_dbus_string_free): allow freeing a const string as
392 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
394 * dbus/dbus-test-main.c (main): take an argument which is the
395 directory containing test data
397 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
398 argument to this and load all the messages in test/data/
399 checking that they can be loaded or not loaded as appropriate.
401 2003-01-27 Anders Carlsson <andersca@codefactory.se>
403 * bus/dispatch.c: (bus_dispatch_message_handler):
404 Dispatch messages sent to services.
406 * bus/driver.c: (bus_driver_send_service_deleted),
407 (bus_driver_send_service_created), (bus_driver_send_service_lost),
408 (bus_driver_send_service_acquired):
409 Add helper functions for sending service related messages.
411 (bus_driver_send_welcome_message):
412 Send HELLO_REPLY instead of WELCOME.
414 (bus_driver_handle_list_services):
415 Send LIST_SERVICES_REPLY instead of SERVICES.
417 (bus_driver_handle_own_service),
418 (bus_driver_handle_service_exists):
419 New message handlers.
421 (bus_driver_handle_message):
422 Invoke new message handlers.
424 (bus_driver_remove_connection):
425 Don't remove any services here since that's done automatically
426 by bus_service_remove_owner now.
429 New function signatures.
431 * bus/services.c: (bus_service_add_owner):
432 Send ServiceAcquired message if we're the only primary owner.
434 (bus_service_remove_owner):
435 Send ServiceAcquired/ServiceLost messages.
437 (bus_service_set_prohibit_replacement),
438 (bus_service_get_prohibit_replacement):
439 Functions for setting prohibit replacement.
441 (bus_service_has_owner):
442 New function that checks if a connection is in the owner queue of
446 Add new function signatures.
448 * dbus/dbus-list.c: (_dbus_list_test):
449 Add tests for _dbus_list_remove_last and traversing the list backwards.
452 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
453 go any further, so return NULL then.
455 * dbus/dbus-protocol.h:
456 Add new messages, service flags and service replies.
458 2003-01-26 Havoc Pennington <hp@pobox.com>
460 * dbus/dbus-message-builder.c: implement, completely untested.
462 * test/data/*: add data to be used in testing.
463 ".message" files are our simple loadable text format.
464 ".message-raw" will be binary dumps of messages.
466 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
468 2003-01-26 Havoc Pennington <hp@pobox.com>
470 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
472 * dbus/dbus-errors.c (dbus_result_to_string): add
475 * dbus/dbus-message-builder.c: new file, will contain code to load
476 up messages from files. Not implemented yet.
478 2003-01-26 Havoc Pennington <hp@pobox.com>
480 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
481 the sender by setting to NULL
483 2003-01-26 Havoc Pennington <hp@pobox.com>
485 The unit tests pass, but otherwise untested. If it breaks, the
486 tests should have been better. ;-)
488 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
491 * dbus/dbus-message.c: redo everything so we maintain
492 message->header as the only copy of the various fields.
493 This avoids the possibility of out-of-memory in some cases,
494 for example dbus_message_lock() can't run out of memory anymore,
495 and avoids extra copying. Figured I may as well go ahead and do
496 this since it was busted for dbus_message_lock to not return
497 failure on OOM, and dbus_message_write_header was totally
498 unchecked for OOM. Also fixed some random other bugs.
500 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
501 that strings are nul-terminated. Also, end_pos can be equal
502 to string length just not greater than, I think.
503 (_dbus_marshal_set_int32): new function
504 (_dbus_marshal_set_uint32): new function
505 (_dbus_marshal_set_string): new function
507 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
508 a warning, init timeout_list to NULL
509 (dbus_connection_send_message): don't use uninitialized variable
512 * dbus/dbus-string.c (_dbus_string_replace_len): new function
514 2003-01-26 Anders Carlsson <andersca@codefactory.se>
516 * bus/driver.c: (bus_driver_handle_hello),
517 (bus_driver_send_welcome_message):
520 2003-01-26 Anders Carlsson <andersca@codefactory.se>
522 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
523 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
524 (dbus_connection_unref):
525 * dbus/dbus-marshal.c: (_dbus_marshal_test):
526 * dbus/dbus-message.c: (dbus_message_unref),
529 (dbus_message_get_fields):
530 Remove debugging printout.
532 (_dbus_message_loader_return_buffer):
533 Don't store the header string.
535 (_dbus_message_test):
538 2003-01-26 Richard Hult <rhult@codefactory.se>
540 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
541 the file descriptor list, since it can change under us.
543 2003-01-25 Anders Carlsson <andersca@codefactory.se>
545 * glib/dbus-gmain.c: (dbus_connection_prepare),
546 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
547 (remove_watch), (dbus_connection_hookup_with_g_main):
548 Rewrite the glib handling to use its own GSource instead of a
549 GIOChannel so we can catch messages put in the queue while waiting
552 2003-01-25 Anders Carlsson <andersca@codefactory.se>
555 * bus/connection.c: (connection_disconnect_handler),
556 (connection_watch_callback), (bus_connection_setup):
557 * bus/dispatch.c: (send_one_message),
558 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
559 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
561 * bus/driver.c: (bus_driver_send_service_deleted),
562 (bus_driver_send_service_created), (bus_driver_handle_hello),
563 (bus_driver_send_welcome_message),
564 (bus_driver_handle_list_services), (bus_driver_remove_connection),
565 (bus_driver_handle_message):
567 Refactor code, put the message dispatching in its own file. Use
568 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
571 2003-01-25 Anders Carlsson <andersca@codefactory.se>
573 * dbus/dbus-internals.h:
574 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
576 * dbus/dbus-message.c: (dbus_message_get_sender):
577 * dbus/dbus-message.h:
578 Implement dbus_message_get_sender.
580 * dbus/dbus-protocol.h:
581 Add message and service defines.
583 2003-01-25 Anders Carlsson <andersca@codefactory.se>
585 * dbus/dbus-connection.c: (dbus_connection_send_message):
586 * dbus/dbus-message-internal.h:
587 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
588 (dbus_message_write_header):
589 Remove _dbus_messag_unlock and don't set the client serial on a
590 message if one already exists.
592 2003-01-24 Havoc Pennington <hp@pobox.com>
594 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
597 * bus/driver.c (bus_driver_handle_list_services): fix a leak
600 2003-01-25 Anders Carlsson <andersca@codefactory.se>
602 * dbus/dbus-list.c: (alloc_link), (free_link):
603 Use a memory pool for the links.
605 2003-01-25 Anders Carlsson <andersca@codefactory.se>
607 * bus/connection.c: (bus_connection_foreach):
609 Add new bus_connection_foreach function.
611 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
612 Add function that broadcasts a message to all clients.
614 (bus_driver_send_service_created), (bus_driver_handle_hello),
615 (bus_driver_send_welcome_message),
616 (bus_driver_handle_list_services), (bus_driver_message_handler):
617 Implement functions that take care of listing services, and notifying
618 clients when new services are created.
620 * bus/services.c: (bus_services_list):
622 Add new function that returns an array of strings with the currently
627 Update copyright year.
629 2003-01-25 Anders Carlsson <andersca@codefactory.se>
631 * dbus/dbus-connection.c: (dbus_connection_send_message):
632 Unlock the message in case it was sent earlier.
634 (dbus_connection_send_message_with_reply_and_block):
635 Remove the reply message from the list.
637 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
638 Set array_len and new_pos correctly.
640 (_dbus_marshal_test):
643 * dbus/dbus-message-internal.h:
644 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
645 New function that returns the reply serial.
647 (_dbus_message_unlock):
648 New function that unlocks a message and resets its header.
650 (dbus_message_append_string_array),
651 (dbus_message_get_fields_valist),
652 (dbus_message_iter_get_field_type),
653 (dbus_message_iter_get_string_array),
654 (dbus_message_get_fields),
655 (dbus_message_append_fields_valist):
656 Handle string arrays.
658 (dbus_message_set_sender):
659 Make this function public since the bus daemon needs it.
661 (decode_header_data):
662 Set the reply serial to -1 initially.
664 * dbus/dbus-message.h:
665 Add dbus_message_set_sender.
667 2003-01-24 Havoc Pennington <hp@pobox.com>
669 * doc/dbus-specification.sgml: add some stuff
671 2003-01-22 Havoc Pennington <hp@pobox.com>
673 * doc/dbus-specification.sgml: Start to document the protocol.
675 2003-01-22 Havoc Pennington <hp@pobox.com>
677 * dbus/dbus-connection.c
678 (dbus_connection_send_message_with_reply_and_block): add some @todo
680 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
682 2003-01-21 Havoc Pennington <hp@pobox.com>
684 (patch untested because can't compile)
686 * bus/driver.c (create_unique_client_name): make this function
687 never recycle client names. Also, caller should initialize
690 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
692 2003-01-21 Anders Carlsson <andersca@codefactory.se>
694 * dbus/dbus-marshal.c: (_dbus_marshal_double),
695 (_dbus_marshal_int32), (_dbus_marshal_uint32),
696 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
697 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
698 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
699 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
700 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
701 * dbus/dbus-marshal.h:
702 * dbus/dbus-protocol.h:
703 Add support for marshalling and demarshalling integer, double
706 2003-01-21 Anders Carlsson <andersca@codefactory.se>
711 * bus/connection.c: (connection_disconnect_handler):
712 Remove the connection from the bus driver's list.
714 (connection_watch_callback): Dispatch messages.
716 (free_connection_data): Free connection name.
718 (bus_connection_setup): Add connection to the bus driver's list.
719 (bus_connection_remove_owned_service):
720 (bus_connection_set_name), (bus_connection_get_name):
721 Add functions for setting and getting the connection's name.
724 Add function headers.
726 * bus/driver.c: (create_unique_client_name),
727 (bus_driver_handle_hello_message),
728 (bus_driver_send_welcome_message), (bus_driver_message_handler),
729 (bus_driver_add_connection), (bus_driver_remove_connection):
732 * bus/services.c: (bus_service_free):
734 New file that handles communication and registreation with the bus
737 2003-01-21 Anders Carlsson <andersca@codefactory.se>
739 * dbus/dbus-connection.c: (dbus_connection_send_message):
740 Add a new client_serial parameter.
742 (dbus_connection_send_message_with_reply):
743 Remove a @todo since we've implemented the blocking function.
745 (dbus_connection_send_message_with_reply_and_block):
746 New function that sends a message and waits for a reply and
747 then returns the reply.
749 * dbus/dbus-connection.h:
752 * dbus/dbus-errors.c: (dbus_result_to_string):
753 * dbus/dbus-errors.h:
756 * dbus/dbus-message-internal.h:
757 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
758 (_dbus_message_set_sender), (dbus_message_write_header),
759 (dbus_message_new_reply), (decode_header_data),
760 (_dbus_message_loader_return_buffer), (_dbus_message_test):
761 * dbus/dbus-message.h:
762 Add new functions that set the reply serial and sender.
763 Also marshal and demarshal them correctly and add test.
765 * dbus/dbus-protocol.h:
766 Add new DBUS_MESSAGE_TYPE_SENDER.
769 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
770 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
771 (dbus_connection_hookup_with_g_main):
772 * glib/test-dbus-glib.c: (main):
773 Rewrite to use GIOChannel and remove the GSource crack.
775 * test/echo-client.c: (main):
776 * test/watch.c: (check_messages):
777 Update for changed APIs
779 2003-01-19 Anders Carlsson <andersca@codefactory.se>
781 * dbus/Makefile.am: Add dbus-timeout.[cħ]
783 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
784 Create a DBusTimeoutList.
785 (dbus_connection_set_timeout_functions): Add new function to
786 set timeout callbacks
788 * dbus/dbus-connection.h: Add public DBusTimeout API.
790 * dbus/dbus-message.c: (dbus_message_get_service):
791 * dbus/dbus-message.h: New function.
793 * dbus/dbus-server.c: Fix small doc typo.
795 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
797 2003-01-19 Anders Carlsson <andersca@codefactory.se>
799 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
800 of the string, just as long as specified.
802 2003-01-19 Havoc Pennington <hp@pobox.com>
804 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
807 * dbus/dbus-server.c (dbus_server_set_max_connections)
808 (dbus_server_get_max_connections, dbus_server_get_n_connections):
809 keep track of current number of connections, and add API for
810 setting a max (but haven't implemented enforcing the max yet)
812 2003-01-18 Havoc Pennington <hp@pobox.com>
814 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
815 reading/writing if read_watch != NULL or write_watch != NULL.
817 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
818 the message loader code to actually load message->header and
819 message->body into the newly-created message.
821 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
824 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
825 (dbus_connection_get_max_message_size)
826 (dbus_connection_set_max_live_messages_size)
827 (dbus_connection_get_max_live_messages_size): implement some
828 resource limitation functions
830 * dbus/dbus-resources.c: new file implementing some of the
831 resource limits stuff
833 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
834 missing docs, add @todo to handle OOM etc.
836 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
839 2003-01-18 Havoc Pennington <hp@pobox.com>
841 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
842 connection if it hasn't been already.
844 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
845 replace with DisconnectFunction.
847 2003-01-18 Havoc Pennington <hp@pobox.com>
849 Building --disable-verbose-mode --disable-asserts --disable-tests
850 cuts the library from 112K to 45K or so
852 * configure.in: check for varargs macro support,
853 add --enable-verbose-mode, --enable-asserts.
855 * dbus/dbus-internals.h (_dbus_assert): support
857 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
859 2003-01-18 Havoc Pennington <hp@pobox.com>
861 * dbus/dbus-test.c: include config.h so that tests actually run
863 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
864 so the failure mode when that assumption fails will be plenty
867 2003-01-18 Havoc Pennington <hp@pobox.com>
869 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
871 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
874 * test/Makefile.am: don't use special variable "TESTS" for echo-*
875 since we don't want to use those in make check
877 2003-01-15 Havoc Pennington <hp@redhat.com>
883 2003-01-15 Havoc Pennington <hp@redhat.com>
885 * test/Makefile.am: fix so that test source code ends up in the
886 distribution on make distcheck
888 2003-01-15 Havoc Pennington <hp@redhat.com>
894 2003-01-15 Havoc Pennington <hp@redhat.com>
896 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
897 fix build when --disable-tests
899 * Makefile.am (EXTRA_DIST): put HACKING in here
901 * HACKING: document procedure for making a tarball release.
903 2003-01-14 Anders Carlsson <andersca@codefactory.se>
905 * bus/connection.c: (connection_error_handler),
906 (bus_connection_setup):
907 * bus/main.c: (main):
908 Make sure that the DBusConnectionData struct is NULLed
909 out to prevent a segfault.
911 * dbus/dbus-errors.c: (dbus_result_to_string):
912 * dbus/dbus-errors.h:
913 * dbus/dbus-message.c: (dbus_message_get_fields),
914 (dbus_message_get_fields_valist), (_dbus_message_test):
915 * dbus/dbus-message.h:
916 Make dbus_message_get_fields return a result code so we can
917 track invalid fields as well as oom.
919 2003-01-11 Havoc Pennington <hp@pobox.com>
921 * configure.in: change --enable-test/--enable-ansi action-if-given
922 to enable_foo=$enableval instead of enable_foo=yes
924 2003-01-08 Havoc Pennington <hp@pobox.com>
926 * dbus/dbus-string.c (_dbus_string_align_length): new function
928 * dbus/dbus-test-main.c: move main() for test app here
930 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
931 symbol to run tests, because dbus-test isn't in the main
934 Code review nitpicks.
936 * dbus/dbus-message.c (dbus_message_write_header): add newlines
937 for people with narrow emacs ;-). Assert client_serial was filled
938 in. Assert message->name != NULL.
939 (dbus_message_append_fields): have "first_field_type" arg separate
940 from va list, needed for C++ binding that also uses varargs IIRC
941 and helps with type safety
942 (dbus_message_new): add @todo about using DBusString to store
943 service/name internally
944 (dbus_message_new): don't leak ->service and ->name on OOM later
946 (dbus_message_unref): free the service name
947 (dbus_message_get_fields): same change to varargs
948 i.e. first_field_type
949 (_dbus_message_loader_return_buffer): assert that the message data
950 is aligned (if not it's a bug in our code). Put in verbose griping
951 about why we set corrupted = TRUE.
952 (decode_header_data): add FIXME that char* is evil. Was going to
953 add FIXME about evil locale-specific string.h strncmp, but just
954 switched to wacky string-as-uint32 optimization. Move check for
955 "no room for field name" above get_const_data_len() to avoid
956 assertion failure in get_const_data_len if we have trailing 2
957 bytes or the like. Check for service and name fields being
958 provided twice. Don't leak service/name on error. Require field
959 names to be aligned to 4 bytes.
961 * dbus/dbus-marshal.c: move byte swap stuff to header
962 (_dbus_pack_int32): uscore-prefix
963 (_dbus_unpack_int32): uscore-prefix
964 (_dbus_unpack_uint32): export
965 (_dbus_demarshal_string): add @todo complaining about use of
967 (_dbus_marshal_get_field_end_pos): add @todo about bad error
968 handling allowing corrupt data to go unchecked
970 2003-01-08 Havoc Pennington <hp@redhat.com>
972 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
973 to the select() as needed for authentication. (should be using
974 _dbus_poll() not select, but for another day)
976 * dbus/dbus.h: include dbus/dbus-protocol.h
978 2003-01-08 Anders Carlsson <andersca@codefactory.se>
980 * dbus/Makefile.am (dbusinclude_HEADERS): Install
983 2003-01-08 Anders Carlsson <andersca@codefactory.se>
985 * dbus/dbus-internals.c: (_dbus_type_to_string):
986 New function that returns a string describing a type.
988 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
989 * dbus/dbus-marshal.h:
990 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
991 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
992 (dbus_message_iter_get_byte_array):
993 * dbus/dbus-message.h:
994 Add new convenience functions for appending and getting message fields.
995 Also add demarshalling routines for byte arrays.
997 2003-01-07 Anders Carlsson <andersca@codefactory.se>
999 * dbus/dbus-connection-internal.h:
1000 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
1001 (_dbus_connection_get_next_client_serial),
1002 (dbus_connection_send_message):
1003 * dbus/dbus-internals.h:
1004 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
1005 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
1006 (_dbus_marshal_uint32), (_dbus_demarshal_double),
1007 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1008 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1009 (_dbus_verbose_bytes), (_dbus_marshal_test):
1010 * dbus/dbus-marshal.h:
1011 * dbus/dbus-message-internal.h:
1012 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1013 (dbus_message_write_header), (_dbus_message_lock),
1014 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1015 (dbus_message_get_name), (dbus_message_append_int32),
1016 (dbus_message_append_uint32), (dbus_message_append_double),
1017 (dbus_message_append_string), (dbus_message_append_byte_array),
1018 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1019 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1020 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1021 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1022 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1023 (decode_header_data), (_dbus_message_loader_return_buffer),
1024 (message_iter_test), (_dbus_message_test):
1025 * dbus/dbus-message.h:
1026 * dbus/dbus-protocol.h:
1027 * dbus/dbus-test.c: (main):
1029 * glib/test-dbus-glib.c: (message_handler), (main):
1030 * test/echo-client.c: (main):
1031 * test/watch.c: (check_messages):
1032 Make messages sendable and receivable for real.
1034 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1036 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1037 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1038 * dbus/dbus-message.c: (dbus_message_append_int32),
1039 (dbus_message_append_uint32), (dbus_message_append_double),
1040 (dbus_message_append_string), (dbus_message_append_byte_array):
1041 Handle OOM restoration.
1043 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1045 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1046 (_dbus_demarshal_string), (_dbus_marshal_test):
1047 * dbus/dbus-marshal.h:
1048 * dbus/dbus-message.c: (dbus_message_get_name),
1049 Document these functions.
1051 (dbus_message_append_int32), (dbus_message_append_uint32),
1052 (dbus_message_append_double), (dbus_message_append_string),
1053 (dbus_message_append_byte_array):
1054 * dbus/dbus-message.h:
1055 Add functions for adding message fields of different types.
1057 * dbus/dbus-protocol.h:
1058 Add the different types.
1060 2003-01-05 Havoc Pennington <hp@pobox.com>
1062 * bus/connection.c: implement routines for handling connections,
1063 first thing is keeping a list of owned services on each connection
1064 and setting up watches etc.
1066 * bus/services.c: implement a mapping from service names to lists
1069 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1071 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1072 to use static mutexes for global data
1074 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1075 collection of functions to set/get application-specific data
1076 on the DBusConnection.
1078 2003-01-04 Havoc Pennington <hp@pobox.com>
1080 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1081 (_dbus_poll): new function
1083 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1086 * bus/loop.c: initial code for the daemon main loop
1088 2003-01-04 Havoc Pennington <hp@pobox.com>
1090 * test/watch.c (error_handler): make it safe if the error handler
1091 is called multiple times (if we s/error handler/disconnect
1092 handler/ we should just guarantee it's called only once)
1094 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1095 error handler on disconnect (it's quite possible we should
1096 just change the error handler to a "disconnect handler," I'm
1097 not sure we have any other meaningful errors)
1099 * configure.in: check for getpwnam_r
1101 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1102 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1103 mechanism as in SASL spec, using socket credentials
1105 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1106 (_dbus_send_credentials_unix_socket): new function
1108 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1110 (_dbus_write): only check errno if <0 returned
1111 (_dbus_write_two): ditto
1113 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1115 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1116 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1117 (_dbus_marshal_test):
1118 * dbus/dbus-marshal.h:
1119 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1120 to _dbus_marshal_utf8_string. Also fix some tests.
1122 2002-12-28 Harri Porten <porten@kde.org>
1124 * configure.in: added check for C++ compiler and a very cheesy
1125 check for the Qt integration
1127 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1129 * qt/Makefile.am: added
1131 * qt/.cvsignore: added
1133 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1134 latter, added #ifdef QT_THREAD_SUPPORT guard.
1136 * dbus/Makefile.am: added missing headers for make dist
1138 2002-12-28 Kristian Rietveld <kris@gtk.org>
1140 * dbus/Makefile.am: fixup export-symbols-regex.
1142 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1144 * acinclude.m4: Add this file and put the
1145 PKG_CHECK_MODULE macro in it.
1147 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1149 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1150 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1151 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1152 (_dbus_marshal_test):
1153 Make the demarshalling routines align the pos argument.
1154 Add string marshalling tests and fix the obvious bugs
1157 2002-12-26 Havoc Pennington <hp@pobox.com>
1159 * dbus/dbus-auth.c: fixes fixes fixes
1161 * dbus/dbus-transport-unix.c: wire up support for
1162 encoding/decoding data on the wire
1164 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1165 (_dbus_auth_decode_data): append to target string
1166 instead of nuking it.
1168 2002-12-26 Havoc Pennington <hp@pobox.com>
1170 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1171 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1174 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1175 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1176 now). Main point is because I wanted unpack_uint32 to implement
1178 (_dbus_verbose_bytes): new function
1180 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1182 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1183 mechanism to handle a corrupt message stream
1184 (_dbus_message_loader_new): fix preallocation to only prealloc,
1187 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1188 (_dbus_string_test): enhance tests for copy/move and fix the
1191 * dbus/dbus-transport-unix.c: Hold references in more places to
1192 avoid reentrancy problems
1194 * dbus/dbus-transport.c: ditto
1196 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1197 leak reference count in no-message case
1199 * test/watch.c (do_mainloop): handle adding/removing watches
1200 during iteration over the watches. Also, ref the connection/server
1201 stored on a watch, so we don't try to mangle a destroyed one.
1203 * dbus/dbus-transport-unix.c (do_authentication): perform
1206 * dbus/dbus-auth.c (get_state): add a state
1207 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1208 (_dbus_auth_get_unused_bytes): append the unused bytes
1209 to the passed in string, rather than prepend
1211 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1212 the auth conversation DBusAuth
1214 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1215 (_dbus_transport_new_for_domain_socket): when creating a
1216 transport, pass in whether it's a client-side or server-side
1217 transport so we know which DBusAuth to create
1219 2002-12-03 Havoc Pennington <hp@pobox.com>
1221 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1222 _after_ finalizing the derived members
1223 (unix_connection_set): unref watch if we fail to add it
1225 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1226 transport first, so that the connection owned by the
1227 transport will be valid as the transport finalizes.
1229 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1230 if necessary, and remove watches from the connection.
1232 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1234 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1236 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1237 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1238 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1239 (_dbus_marshal_test):
1240 * dbus/dbus-marshal.h:
1241 Add string marshal functions and have the demarshal functions
1242 return the new position.
1244 2002-12-25 Havoc Pennington <hp@pobox.com>
1246 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1247 it is a simple protocol that just maps directly to SASL.
1249 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1250 initial implementation, not actually used yet.
1252 * dbus/dbus-string.c (_dbus_string_find): new function
1253 (_dbus_string_equal): new function
1254 (_dbus_string_base64_encode): new function
1255 (_dbus_string_base64_decode): new function
1257 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1260 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1261 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1262 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1263 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1264 * dbus/dbus-marshal.h:
1265 * dbus/dbus-protocol.h:
1266 * dbus/dbus-test.c: (main):
1268 Add un-optimized marshalling/demarshalling routines.
1270 2002-12-25 Harri Porten <porten@kde.org>
1272 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1274 2002-12-24 Zack Rusin <zack@kde.org>
1276 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1277 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1280 2002-12-24 Havoc Pennington <hp@pobox.com>
1282 * glib/dbus-gthread.c: fix include
1284 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1285 I think glib API needs to change, though, as you don't
1286 want to use DBusMessageFunction, you want to use the
1287 DBusMessageHandler object. Probably
1288 dbus_connection_open_with_g_main_loop()
1289 and dbus_connection_setup_g_main_loop() or something like that
1290 (but think of better names...) that just create a connection
1291 that has watch/timeout functions etc. already set up.
1293 * dbus/dbus-connection.c
1294 (dbus_connection_send_message_with_reply): new function just to
1295 show how the message handler helps us deal with replies.
1297 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1299 * dbus/dbus-string.c (_dbus_string_test): free a string that
1302 * dbus/dbus-hash.c: use memory pools for the hash entries
1303 (rebuild_table): be more paranoid about overflow, and
1304 shrink table when we can
1305 (_dbus_hash_test): reduce number of sprintfs and write
1306 valid C89. Add tests for case where we grow and then
1307 shrink the hash table.
1309 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1311 * dbus/dbus-connection.c (dbus_connection_register_handler)
1312 (dbus_connection_unregister_handler): new functions
1314 * dbus/dbus-message.c (dbus_message_get_name): new
1316 * dbus/dbus-list.c: fix docs typo
1318 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1319 an object representing a handler for messages.
1321 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1324 * glib/dbus-gthread.c: (dbus_gthread_init):
1325 Don't use the gdbus prefix for public functions.
1327 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1331 Add GLib checks and fixup .pc files
1335 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1336 (gdbus_connection_check), (gdbus_connection_dispatch),
1337 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1338 (dbus_connection_gsource_new):
1339 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1340 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1341 * glib/test-dbus-glib.c: (message_handler), (main):
1344 2002-12-15 Harri Porten <porten@kde.org>
1346 * autogen.sh: check for libtoolize before attempting to use it
1348 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1351 * .cvsignore: ignore more stamp files
1353 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1355 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1356 without make install.
1358 2002-12-15 Havoc Pennington <hp@pobox.com>
1360 * dbus/dbus-threads.c: add thread stubs that a higher library
1361 layer can fill in. e.g. the GLib wrapper might fill them in with
1362 GThread stuff. We still need to use this thread API to
1363 thread-safe-ize the library.
1365 2002-12-12 Havoc Pennington <hp@pobox.com>
1367 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1368 below new interfaces and include fewer system headers.
1370 * dbus/dbus-sysdeps.c (_dbus_read): new function
1371 (_dbus_write): new function
1372 (_dbus_write_two): new function
1373 (_dbus_connect_unix_socket): new function
1374 (_dbus_listen_unix_socket): new function
1376 * dbus/dbus-message-internal.h: change interfaces to use
1379 2002-12-11 Havoc Pennington <hp@pobox.com>
1381 * dbus/dbus-types.h: add dbus_unichar
1383 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1385 * dbus/dbus-connection.c (dbus_connection_send_message): return
1388 * dbus/dbus-transport.c: include dbus-watch.h
1390 * dbus/dbus-connection.c: include dbus-message-internal.h
1392 * HACKING: add file with coding guidelines stuff.
1394 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1395 handling here, for security purposes (as in vsftpd). Not actually
1396 using this class yet.
1398 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1399 system/libc usage here, as in vsftpd, for ease of auditing (and
1400 should also simplify portability). Haven't actually moved all the
1401 system/libc usage into here yet.
1403 2002-11-25 Havoc Pennington <hp@pobox.com>
1405 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1406 always print the first verbose message.
1408 2002-11-24 Havoc Pennington <hp@pobox.com>
1410 * test/echo-client.c, test/echo-server.c: cheesy test
1413 * configure.in (AC_CHECK_FUNCS): check for writev
1415 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1418 * dbus/dbus-list.c (_dbus_list_foreach): new function
1420 * dbus/dbus-internals.c (_dbus_verbose): new function
1422 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1423 representing a server that listens for connections.
1425 * dbus/.cvsignore: create
1427 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1428 public API for reporting errors
1430 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1431 public object representing a connection that
1432 sends/receives messages. (Same object used for
1433 both client and server.)
1435 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1436 Basic abstraction for different kinds of stream
1437 that we might read/write messages from.
1439 2002-11-23 Havoc Pennington <hp@pobox.com>
1441 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1444 * dbus/dbus-test.c (main): add list test, and include
1445 dbus-test.h as intended
1447 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1448 (_dbus_hash_table_remove_int): return value indicates
1449 whether the entry existed to remove
1451 * dbus/dbus-list.c: add linked list utility class,
1454 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1457 2002-11-23 Havoc Pennington <hp@pobox.com>
1459 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1460 DBUS_END_DECLS to nothing, that should fix this once and for all
1462 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1464 * dbus/dbus-message.c, dbus/dbus-hash.c:
1465 add some missing @brief
1467 2002-11-23 Havoc Pennington <hp@pobox.com>
1469 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1470 to avoid confusing Doxygen
1472 * dbus/dbus-hash.c: @} not }@
1474 * dbus/dbus-message.c (struct DBusMessage): split out
1477 2002-11-23 Havoc Pennington <hp@pobox.com>
1479 * configure.in: pile on more warning flags if using gcc
1481 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1482 to document static functions
1484 * configure.in: add summary to end of configure so it
1485 looks nice and attractive
1487 * dbus/dbus-hash.c: finish implementation and write unit
1490 * configure.in: add --enable-tests to enable unit tests
1492 * dbus/dbus-test.c: test program to run unit tests
1493 for all files in dbus/*, initially runs a test for
1496 * dbus/dbus-internals.h: file to hold some internal utility stuff
1498 2002-11-22 Havoc Pennington <hp@redhat.com>
1500 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1501 "ported" away from Tcl
1503 * dbus/dbus-types.h: header for types such as dbus_bool_t
1505 2002-11-22 Havoc Pennington <hp@redhat.com>
1507 * dbus/dbus.h: fixups for doc warnings
1509 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1511 (QUIET): make it quiet so we can see warnings
1513 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1515 2002-11-22 Havoc Pennington <hp@redhat.com>
1517 * Makefile.am: include "Doxyfile" target in all-local
1519 * configure.in: generate the Doxyfile
1521 * Doxyfile.in: move Doxyfile here, so we can use
1522 configure to generate a Doxyfile with the right
1525 2002-11-22 Havoc Pennington <hp@redhat.com>
1527 * dbus/dbus-message.c: move inline docs into .c file
1529 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1530 so all docs are under doc/
1531 (MAN_EXTENSION): generate man pages. Use extension
1532 ".3dbus" which matches ".3qt" on my system,
1533 I guess this is OK, I don't know really.
1534 (FILE_PATTERNS): look for .c files not .h, makes sense
1537 2002-11-22 Havoc Pennington <hp@pobox.com>
1539 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1540 because any app can be a server, and any app can be a client,
1541 the bus is a special kind of server.
1543 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1545 * Doxyfile : adding. Still needs Makefile rules to be generated
1546 automatically (just run "doxygen" in the toplevel dir for now to
1549 * dbus/dbus-message.h : Adding sample docs (javadoc since
1550 resembles gtk-doc a little more)
1552 * dbus/dbus.h : Adding sample docs
1554 2002-11-21 Havoc Pennington <hp@redhat.com>
1556 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1557 so we can allow ourselves to include files directly,
1558 instead of having to use dbus.h
1560 * dbus/dbus.h: fill in
1562 * dbus/dbus-message.h: sketch out a sample header file.
1563 Include griping if you include it directly instead of
1566 * dbus/dbus-macros.h: new file with macros for extern "C",
1567 TRUE/FALSE, NULL, etc.
1569 * doc/file-boilerplate.c: put include guards in here
1571 2002-11-21 Havoc Pennington <hp@redhat.com>
1573 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1575 * COPYING: include the GPL as well, and license code
1576 under both AFL and GPL.
1578 2002-11-21 Havoc Pennington <hp@redhat.com>
1580 * acconfig.h: get rid of this
1582 * autogen.sh (run_configure): add --no-configure option
1584 * configure.in: remove AC_ARG_PROGRAM to make
1585 autoconf complain less. add AC_PREREQ.
1586 add AC_DEFINE third arg.
1588 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1591 Fix references so we can distcheck.
1593 2002-11-21 Havoc Pennington <hp@redhat.com>
1595 * Initial module creation