1 2003-02-10 Havoc Pennington <hp@pobox.com>
3 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
4 initial cut at test framework for DBusAuth from laptop.
5 Doesn't quite work yet but it compiles and I need to get
6 it off the 266mhz laptop. ;-)
8 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
9 fix a memleak in error case
11 2003-02-12 Anders Carlsson <andersca@codefactory.se>
16 Add a desktop file parser.
18 2003-02-11 Zack Rusin <zack@kde.org>
20 * qt/message.[h|cpp]: sample implementation
21 of the KDE wrapper for DBusMessage
23 2003-02-09 Zack Rusin <zack@kde.org>
25 * test/bus-test.c: make_it_compile
26 * doc/dbus-specification.sgml: minimal semantic fix
28 2003-02-06 Anders Carlsson <andersca@codefactory.se>
34 2003-02-06 Anders Carlsson <andersca@codefactory.se>
37 * dbus/dbus-break-loader.c:
39 * test/break-loader.c:
40 Move dbus-break-loader to test/ and rename it to break-loader.
42 2003-02-02 Havoc Pennington <hp@pobox.com>
44 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
45 for code to manage cookies in your home directory
47 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
49 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
50 to authenticate, then disconnect the client.
52 2003-02-03 Alexander Larsson <alexl@redhat.com>
54 * dbus/dbus-message.c (dbus_message_append_fields):
57 2003-02-02 Anders Carlsson <andersca@codefactory.se>
59 * doc/dbus-specification.sgml:
60 Update address format section.
62 2003-02-02 Anders Carlsson <andersca@codefactory.se>
65 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
66 (message_handler), (new_connection_callback), (loop_quit),
70 2003-02-02 Anders Carlsson <andersca@codefactory.se>
72 * bus/driver.c: (bus_driver_handle_service_exists):
73 Simplify the code a bit.
75 * dbus/dbus-bus.c: (dbus_bus_service_exists):
78 2003-02-02 Anders Carlsson <andersca@codefactory.se>
81 Add libdbus-daemon.la and link to it.
83 2003-02-01 James Willcox <jwillcox@gnome.org>
85 * bus/driver.c: (bus_driver_handle_own_service):
86 Actually include the service reply code in the message.
88 2003-02-02 Anders Carlsson <andersca@codefactory.se>
90 * bus/driver.c: (bus_driver_handle_service_exists):
91 Don't unref the incoming message.
93 2003-02-02 Anders Carlsson <andersca@codefactory.se>
95 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
97 2003-02-02 Anders Carlsson <andersca@codefactory.se>
99 * dbus/dbus-server.c: (dbus_server_listen):
100 * dbus/dbus-transport.c: (_dbus_transport_open):
101 ifdef out the calls to the debug transport and server.
103 2003-02-02 Alexander Larsson <alexl@redhat.com>
105 * dbus/dbus-watch.c (dbus_watch_get_flags):
106 Add note in the docs that ERROR or HANGUP won't be returned
107 and are assumed always on.
109 * glib/dbus-gmain.c (add_watch):
110 Always add IO_ERR | IO_HUP
112 * dbus/dbus-message.h:
113 Add semicolon after dbus_message_iter_get_string_array().
114 Makes qt code build again
116 2003-02-01 Anders Carlsson <andersca@codefactory.se>
118 * bus/driver.c: (create_unique_client_name),
119 (bus_driver_handle_hello):
120 Don't take a name, just use a numeric id to identify
124 * dbus/dbus-bus.c: (dbus_bus_register_client),
125 (dbus_bus_acquire_service), (dbus_bus_service_exists):
127 Add new convenience functions for communicating with the bus.
129 * dbus/dbus-message.h:
131 * dbus/dbus-protocol.h:
134 2003-02-01 Alexander Larsson <alexl@redhat.com>
136 * dbus/dbus-message.c (dbus_message_append_fields):
137 Add some more doc comments.
139 2003-02-01 Havoc Pennington <hp@pobox.com>
141 * dbus/dbus-break-loader.c (randomly_modify_length): change
142 a 4-byte value in the message as if it were a length
144 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
145 execute bit on saved files
147 2003-02-01 Havoc Pennington <hp@pobox.com>
149 * dbus/dbus-break-loader.c (main): new program to find messages
150 that break the loader.
152 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
153 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
155 * dbus/dbus-string.c (_dbus_string_set_byte): new
157 2003-01-31 Havoc Pennington <hp@pobox.com>
159 * dbus/dbus-message.c: refactor the test code to be more general,
160 in preparation for writing a "randomly permute test cases to
161 try to break the loader" program.
163 2003-01-31 Havoc Pennington <hp@pobox.com>
165 * doc/dbus-specification.sgml: work on the specification
167 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
168 the protocol version of the message.
170 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
171 no longer specifies that.
172 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
175 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
176 "break" for DBUS_TYPE_NIL, remove @todo
178 2003-01-31 Havoc Pennington <hp@pobox.com>
180 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
181 just set_is_error/get_is_error as this is a commonly-used
182 function, and write docs.
184 2003-01-31 Anders Carlsson <andersca@codefactory.se>
186 * dbus/dbus-address.c: (dbus_address_entry_free):
187 Free key and value lists.
189 * dbus/dbus-internals.c: (_dbus_type_to_string):
190 Add the types we didn't have.
192 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
193 (_dbus_marshal_validate_arg):
196 * dbus/dbus-message.c: (dbus_message_set_sender):
197 Remove todo about being able to set sender to NULL.
199 (dbus_message_set_is_error_reply),
200 (dbus_message_get_is_error_reply):
201 * dbus/dbus-message.h:
204 * dbus/dbus-protocol.h:
205 Add error reply flag.
207 * test/data/valid-messages/opposite-endian.message:
208 Add NIL type to test.
210 2003-01-31 Havoc Pennington <hp@pobox.com>
212 * doc/dbus-specification.sgml: fully specify the header. Add
213 flags and major protocol version, and change header/body len to
216 * dbus/dbus-message-builder.c (append_saved_length): append length
219 * dbus/dbus-message.c (dbus_message_create_header): change header
220 length and body length to unsigned. Add the new fields from the
222 (_dbus_message_loader_return_buffer): unsigned header/body len
224 2003-01-30 Havoc Pennington <hp@pobox.com>
226 * dbus/dbus-auth.c: rework to use only REJECTED, no
229 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
230 use REJECTED, suggested by Mark McLoughlin
232 2003-01-30 Havoc Pennington <hp@pobox.com>
234 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
235 a better way to report errors here. e.g. "unix address lacks
236 path" or something. also "no such file" when the path doesn't
239 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
241 (dbus_parse_address): add @todo about documenting address format,
242 and allowing , and ; to be escaped
244 2003-01-30 Anders Carlsson <andersca@codefactory.se>
247 Add dbus-address.[ch]
249 * dbus/dbus-address.c: (dbus_address_entry_free),
250 (dbus_address_entries_free), (create_entry),
251 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
252 (dbus_parse_address), (_dbus_address_test):
253 * dbus/dbus-address.h:
254 New files for dealing with address parsing.
256 * dbus/dbus-connection.c:
257 Document timeout functions.
259 * dbus/dbus-message.c:
260 Document dbus_message_new_from_message.
262 * dbus/dbus-server-debug.c:
265 * dbus/dbus-server.c: (dbus_server_listen):
266 Parse address and use correct server implementation.
268 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
269 * dbus/dbus-string.h:
270 New function with test.
272 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
276 * dbus/dbus-transport-debug.c:
279 * dbus/dbus-transport.c: (_dbus_transport_open):
280 Parse address and use correct transport implementation.
282 2003-01-30 Havoc Pennington <hp@pobox.com>
284 * dbus/dbus-message.c: use message->byte_order instead of
285 DBUS_COMPILER_BYTE_ORDER throughout.
286 (dbus_message_create_header): pad header to align the
287 start of the body of the message to 8-byte boundary
289 * dbus/dbus-marshal.h: make all the demarshalers take const
290 DBusString arguments.
292 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
293 validate message args here, so we don't have to do slow validation
294 later, and so we catch bad messages as they are incoming. Also add
295 better checks on header_len and body_len. Also fill in
298 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
299 implemented properly)
300 (_dbus_string_validate_nul): new function to check all-nul
302 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
303 get_arg_end_pos and remove all validation
304 (_dbus_marshal_validate_arg): actually do validation here.
306 2003-01-29 Havoc Pennington <hp@pobox.com>
308 * dbus/dbus-message.c (check_message_handling): fix assertion
309 failure on set_client_serial
311 2003-01-28 Havoc Pennington <hp@pobox.com>
313 * dbus/dbus-server-debug.c: Add doc section comments
315 * dbus/dbus-transport-debug.c: add doc section comments
317 2003-01-28 Havoc Pennington <hp@redhat.com>
319 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
320 the reverse order from how I had it
321 (_dbus_string_base64_encode): reverse encoding order. I was
322 basically byteswapping everything during encoding.
324 2003-01-28 Anders Carlsson <andersca@codefactory.se>
326 * dbus/dbus-connection-internal.h:
327 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
328 (_dbus_connection_remove_timeout):
329 Add functions for adding and removing timeouts.
331 * dbus/dbus-message.c: (dbus_message_new_from_message):
332 Add new function that takes a message and creates an exact
333 copy of it, but with the refcount set to 1.
334 (check_message_handling):
337 * dbus/dbus-server-protected.h:
338 * dbus/dbus-server.c: (_dbus_server_init_base),
339 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
340 (dbus_server_set_timeout_functions):
341 (_dbus_server_remove_timeout):
342 New functions so that a server can add and remove timeouts.
344 (dbus_server_listen):
345 Add commented out call to dbus_server_debug_new.
347 * dbus/dbus-timeout.c: (_dbus_timeout_new):
348 Actually set the handler, doh.
350 * dbus/dbus-transport.c: (_dbus_transport_open):
351 Add commented out call to dbus_transport_debug_client_new.
354 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
356 2003-01-28 Havoc Pennington <hp@pobox.com>
358 * dbus/dbus-message.c (check_message_handling): function to check
359 on the loaded message, iterates over it etc.
361 2003-01-28 Havoc Pennington <hp@pobox.com>
363 * test/Makefile.am (dist-hook): fix make distdir
365 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
367 2003-01-27 Havoc Pennington <hp@pobox.com>
369 * dbus/dbus-mempool.c (time_for_size): replace printf with
372 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
373 empty lines; fix the SAVE_LENGTH stuff to be
374 START_LENGTH/END_LENGTH so it actually works; couple other
377 * test/Makefile.am (dist-hook): add dist-hook for .message files
379 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
380 can be constant or locked.
381 (_dbus_string_free): allow freeing a const string as
384 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
386 * dbus/dbus-test-main.c (main): take an argument which is the
387 directory containing test data
389 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
390 argument to this and load all the messages in test/data/
391 checking that they can be loaded or not loaded as appropriate.
393 2003-01-27 Anders Carlsson <andersca@codefactory.se>
395 * bus/dispatch.c: (bus_dispatch_message_handler):
396 Dispatch messages sent to services.
398 * bus/driver.c: (bus_driver_send_service_deleted),
399 (bus_driver_send_service_created), (bus_driver_send_service_lost),
400 (bus_driver_send_service_acquired):
401 Add helper functions for sending service related messages.
403 (bus_driver_send_welcome_message):
404 Send HELLO_REPLY instead of WELCOME.
406 (bus_driver_handle_list_services):
407 Send LIST_SERVICES_REPLY instead of SERVICES.
409 (bus_driver_handle_own_service),
410 (bus_driver_handle_service_exists):
411 New message handlers.
413 (bus_driver_handle_message):
414 Invoke new message handlers.
416 (bus_driver_remove_connection):
417 Don't remove any services here since that's done automatically
418 by bus_service_remove_owner now.
421 New function signatures.
423 * bus/services.c: (bus_service_add_owner):
424 Send ServiceAcquired message if we're the only primary owner.
426 (bus_service_remove_owner):
427 Send ServiceAcquired/ServiceLost messages.
429 (bus_service_set_prohibit_replacement),
430 (bus_service_get_prohibit_replacement):
431 Functions for setting prohibit replacement.
433 (bus_service_has_owner):
434 New function that checks if a connection is in the owner queue of
438 Add new function signatures.
440 * dbus/dbus-list.c: (_dbus_list_test):
441 Add tests for _dbus_list_remove_last and traversing the list backwards.
444 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
445 go any further, so return NULL then.
447 * dbus/dbus-protocol.h:
448 Add new messages, service flags and service replies.
450 2003-01-26 Havoc Pennington <hp@pobox.com>
452 * dbus/dbus-message-builder.c: implement, completely untested.
454 * test/data/*: add data to be used in testing.
455 ".message" files are our simple loadable text format.
456 ".message-raw" will be binary dumps of messages.
458 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
460 2003-01-26 Havoc Pennington <hp@pobox.com>
462 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
464 * dbus/dbus-errors.c (dbus_result_to_string): add
467 * dbus/dbus-message-builder.c: new file, will contain code to load
468 up messages from files. Not implemented yet.
470 2003-01-26 Havoc Pennington <hp@pobox.com>
472 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
473 the sender by setting to NULL
475 2003-01-26 Havoc Pennington <hp@pobox.com>
477 The unit tests pass, but otherwise untested. If it breaks, the
478 tests should have been better. ;-)
480 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
483 * dbus/dbus-message.c: redo everything so we maintain
484 message->header as the only copy of the various fields.
485 This avoids the possibility of out-of-memory in some cases,
486 for example dbus_message_lock() can't run out of memory anymore,
487 and avoids extra copying. Figured I may as well go ahead and do
488 this since it was busted for dbus_message_lock to not return
489 failure on OOM, and dbus_message_write_header was totally
490 unchecked for OOM. Also fixed some random other bugs.
492 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
493 that strings are nul-terminated. Also, end_pos can be equal
494 to string length just not greater than, I think.
495 (_dbus_marshal_set_int32): new function
496 (_dbus_marshal_set_uint32): new function
497 (_dbus_marshal_set_string): new function
499 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
500 a warning, init timeout_list to NULL
501 (dbus_connection_send_message): don't use uninitialized variable
504 * dbus/dbus-string.c (_dbus_string_replace_len): new function
506 2003-01-26 Anders Carlsson <andersca@codefactory.se>
508 * bus/driver.c: (bus_driver_handle_hello),
509 (bus_driver_send_welcome_message):
512 2003-01-26 Anders Carlsson <andersca@codefactory.se>
514 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
515 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
516 (dbus_connection_unref):
517 * dbus/dbus-marshal.c: (_dbus_marshal_test):
518 * dbus/dbus-message.c: (dbus_message_unref),
521 (dbus_message_get_fields):
522 Remove debugging printout.
524 (_dbus_message_loader_return_buffer):
525 Don't store the header string.
527 (_dbus_message_test):
530 2003-01-26 Richard Hult <rhult@codefactory.se>
532 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
533 the file descriptor list, since it can change under us.
535 2003-01-25 Anders Carlsson <andersca@codefactory.se>
537 * glib/dbus-gmain.c: (dbus_connection_prepare),
538 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
539 (remove_watch), (dbus_connection_hookup_with_g_main):
540 Rewrite the glib handling to use its own GSource instead of a
541 GIOChannel so we can catch messages put in the queue while waiting
544 2003-01-25 Anders Carlsson <andersca@codefactory.se>
547 * bus/connection.c: (connection_disconnect_handler),
548 (connection_watch_callback), (bus_connection_setup):
549 * bus/dispatch.c: (send_one_message),
550 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
551 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
553 * bus/driver.c: (bus_driver_send_service_deleted),
554 (bus_driver_send_service_created), (bus_driver_handle_hello),
555 (bus_driver_send_welcome_message),
556 (bus_driver_handle_list_services), (bus_driver_remove_connection),
557 (bus_driver_handle_message):
559 Refactor code, put the message dispatching in its own file. Use
560 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
563 2003-01-25 Anders Carlsson <andersca@codefactory.se>
565 * dbus/dbus-internals.h:
566 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
568 * dbus/dbus-message.c: (dbus_message_get_sender):
569 * dbus/dbus-message.h:
570 Implement dbus_message_get_sender.
572 * dbus/dbus-protocol.h:
573 Add message and service defines.
575 2003-01-25 Anders Carlsson <andersca@codefactory.se>
577 * dbus/dbus-connection.c: (dbus_connection_send_message):
578 * dbus/dbus-message-internal.h:
579 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
580 (dbus_message_write_header):
581 Remove _dbus_messag_unlock and don't set the client serial on a
582 message if one already exists.
584 2003-01-24 Havoc Pennington <hp@pobox.com>
586 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
589 * bus/driver.c (bus_driver_handle_list_services): fix a leak
592 2003-01-25 Anders Carlsson <andersca@codefactory.se>
594 * dbus/dbus-list.c: (alloc_link), (free_link):
595 Use a memory pool for the links.
597 2003-01-25 Anders Carlsson <andersca@codefactory.se>
599 * bus/connection.c: (bus_connection_foreach):
601 Add new bus_connection_foreach function.
603 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
604 Add function that broadcasts a message to all clients.
606 (bus_driver_send_service_created), (bus_driver_handle_hello),
607 (bus_driver_send_welcome_message),
608 (bus_driver_handle_list_services), (bus_driver_message_handler):
609 Implement functions that take care of listing services, and notifying
610 clients when new services are created.
612 * bus/services.c: (bus_services_list):
614 Add new function that returns an array of strings with the currently
619 Update copyright year.
621 2003-01-25 Anders Carlsson <andersca@codefactory.se>
623 * dbus/dbus-connection.c: (dbus_connection_send_message):
624 Unlock the message in case it was sent earlier.
626 (dbus_connection_send_message_with_reply_and_block):
627 Remove the reply message from the list.
629 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
630 Set array_len and new_pos correctly.
632 (_dbus_marshal_test):
635 * dbus/dbus-message-internal.h:
636 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
637 New function that returns the reply serial.
639 (_dbus_message_unlock):
640 New function that unlocks a message and resets its header.
642 (dbus_message_append_string_array),
643 (dbus_message_get_fields_valist),
644 (dbus_message_iter_get_field_type),
645 (dbus_message_iter_get_string_array),
646 (dbus_message_get_fields),
647 (dbus_message_append_fields_valist):
648 Handle string arrays.
650 (dbus_message_set_sender):
651 Make this function public since the bus daemon needs it.
653 (decode_header_data):
654 Set the reply serial to -1 initially.
656 * dbus/dbus-message.h:
657 Add dbus_message_set_sender.
659 2003-01-24 Havoc Pennington <hp@pobox.com>
661 * doc/dbus-specification.sgml: add some stuff
663 2003-01-22 Havoc Pennington <hp@pobox.com>
665 * doc/dbus-specification.sgml: Start to document the protocol.
667 2003-01-22 Havoc Pennington <hp@pobox.com>
669 * dbus/dbus-connection.c
670 (dbus_connection_send_message_with_reply_and_block): add some @todo
672 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
674 2003-01-21 Havoc Pennington <hp@pobox.com>
676 (patch untested because can't compile)
678 * bus/driver.c (create_unique_client_name): make this function
679 never recycle client names. Also, caller should initialize
682 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
684 2003-01-21 Anders Carlsson <andersca@codefactory.se>
686 * dbus/dbus-marshal.c: (_dbus_marshal_double),
687 (_dbus_marshal_int32), (_dbus_marshal_uint32),
688 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
689 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
690 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
691 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
692 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
693 * dbus/dbus-marshal.h:
694 * dbus/dbus-protocol.h:
695 Add support for marshalling and demarshalling integer, double
698 2003-01-21 Anders Carlsson <andersca@codefactory.se>
703 * bus/connection.c: (connection_disconnect_handler):
704 Remove the connection from the bus driver's list.
706 (connection_watch_callback): Dispatch messages.
708 (free_connection_data): Free connection name.
710 (bus_connection_setup): Add connection to the bus driver's list.
711 (bus_connection_remove_owned_service):
712 (bus_connection_set_name), (bus_connection_get_name):
713 Add functions for setting and getting the connection's name.
716 Add function headers.
718 * bus/driver.c: (create_unique_client_name),
719 (bus_driver_handle_hello_message),
720 (bus_driver_send_welcome_message), (bus_driver_message_handler),
721 (bus_driver_add_connection), (bus_driver_remove_connection):
724 * bus/services.c: (bus_service_free):
726 New file that handles communication and registreation with the bus
729 2003-01-21 Anders Carlsson <andersca@codefactory.se>
731 * dbus/dbus-connection.c: (dbus_connection_send_message):
732 Add a new client_serial parameter.
734 (dbus_connection_send_message_with_reply):
735 Remove a @todo since we've implemented the blocking function.
737 (dbus_connection_send_message_with_reply_and_block):
738 New function that sends a message and waits for a reply and
739 then returns the reply.
741 * dbus/dbus-connection.h:
744 * dbus/dbus-errors.c: (dbus_result_to_string):
745 * dbus/dbus-errors.h:
748 * dbus/dbus-message-internal.h:
749 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
750 (_dbus_message_set_sender), (dbus_message_write_header),
751 (dbus_message_new_reply), (decode_header_data),
752 (_dbus_message_loader_return_buffer), (_dbus_message_test):
753 * dbus/dbus-message.h:
754 Add new functions that set the reply serial and sender.
755 Also marshal and demarshal them correctly and add test.
757 * dbus/dbus-protocol.h:
758 Add new DBUS_MESSAGE_TYPE_SENDER.
761 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
762 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
763 (dbus_connection_hookup_with_g_main):
764 * glib/test-dbus-glib.c: (main):
765 Rewrite to use GIOChannel and remove the GSource crack.
767 * test/echo-client.c: (main):
768 * test/watch.c: (check_messages):
769 Update for changed APIs
771 2003-01-19 Anders Carlsson <andersca@codefactory.se>
773 * dbus/Makefile.am: Add dbus-timeout.[cħ]
775 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
776 Create a DBusTimeoutList.
777 (dbus_connection_set_timeout_functions): Add new function to
778 set timeout callbacks
780 * dbus/dbus-connection.h: Add public DBusTimeout API.
782 * dbus/dbus-message.c: (dbus_message_get_service):
783 * dbus/dbus-message.h: New function.
785 * dbus/dbus-server.c: Fix small doc typo.
787 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
789 2003-01-19 Anders Carlsson <andersca@codefactory.se>
791 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
792 of the string, just as long as specified.
794 2003-01-19 Havoc Pennington <hp@pobox.com>
796 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
799 * dbus/dbus-server.c (dbus_server_set_max_connections)
800 (dbus_server_get_max_connections, dbus_server_get_n_connections):
801 keep track of current number of connections, and add API for
802 setting a max (but haven't implemented enforcing the max yet)
804 2003-01-18 Havoc Pennington <hp@pobox.com>
806 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
807 reading/writing if read_watch != NULL or write_watch != NULL.
809 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
810 the message loader code to actually load message->header and
811 message->body into the newly-created message.
813 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
816 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
817 (dbus_connection_get_max_message_size)
818 (dbus_connection_set_max_live_messages_size)
819 (dbus_connection_get_max_live_messages_size): implement some
820 resource limitation functions
822 * dbus/dbus-resources.c: new file implementing some of the
823 resource limits stuff
825 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
826 missing docs, add @todo to handle OOM etc.
828 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
831 2003-01-18 Havoc Pennington <hp@pobox.com>
833 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
834 connection if it hasn't been already.
836 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
837 replace with DisconnectFunction.
839 2003-01-18 Havoc Pennington <hp@pobox.com>
841 Building --disable-verbose-mode --disable-asserts --disable-tests
842 cuts the library from 112K to 45K or so
844 * configure.in: check for varargs macro support,
845 add --enable-verbose-mode, --enable-asserts.
847 * dbus/dbus-internals.h (_dbus_assert): support
849 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
851 2003-01-18 Havoc Pennington <hp@pobox.com>
853 * dbus/dbus-test.c: include config.h so that tests actually run
855 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
856 so the failure mode when that assumption fails will be plenty
859 2003-01-18 Havoc Pennington <hp@pobox.com>
861 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
863 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
866 * test/Makefile.am: don't use special variable "TESTS" for echo-*
867 since we don't want to use those in make check
869 2003-01-15 Havoc Pennington <hp@redhat.com>
875 2003-01-15 Havoc Pennington <hp@redhat.com>
877 * test/Makefile.am: fix so that test source code ends up in the
878 distribution on make distcheck
880 2003-01-15 Havoc Pennington <hp@redhat.com>
886 2003-01-15 Havoc Pennington <hp@redhat.com>
888 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
889 fix build when --disable-tests
891 * Makefile.am (EXTRA_DIST): put HACKING in here
893 * HACKING: document procedure for making a tarball release.
895 2003-01-14 Anders Carlsson <andersca@codefactory.se>
897 * bus/connection.c: (connection_error_handler),
898 (bus_connection_setup):
899 * bus/main.c: (main):
900 Make sure that the DBusConnectionData struct is NULLed
901 out to prevent a segfault.
903 * dbus/dbus-errors.c: (dbus_result_to_string):
904 * dbus/dbus-errors.h:
905 * dbus/dbus-message.c: (dbus_message_get_fields),
906 (dbus_message_get_fields_valist), (_dbus_message_test):
907 * dbus/dbus-message.h:
908 Make dbus_message_get_fields return a result code so we can
909 track invalid fields as well as oom.
911 2003-01-11 Havoc Pennington <hp@pobox.com>
913 * configure.in: change --enable-test/--enable-ansi action-if-given
914 to enable_foo=$enableval instead of enable_foo=yes
916 2003-01-08 Havoc Pennington <hp@pobox.com>
918 * dbus/dbus-string.c (_dbus_string_align_length): new function
920 * dbus/dbus-test-main.c: move main() for test app here
922 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
923 symbol to run tests, because dbus-test isn't in the main
926 Code review nitpicks.
928 * dbus/dbus-message.c (dbus_message_write_header): add newlines
929 for people with narrow emacs ;-). Assert client_serial was filled
930 in. Assert message->name != NULL.
931 (dbus_message_append_fields): have "first_field_type" arg separate
932 from va list, needed for C++ binding that also uses varargs IIRC
933 and helps with type safety
934 (dbus_message_new): add @todo about using DBusString to store
935 service/name internally
936 (dbus_message_new): don't leak ->service and ->name on OOM later
938 (dbus_message_unref): free the service name
939 (dbus_message_get_fields): same change to varargs
940 i.e. first_field_type
941 (_dbus_message_loader_return_buffer): assert that the message data
942 is aligned (if not it's a bug in our code). Put in verbose griping
943 about why we set corrupted = TRUE.
944 (decode_header_data): add FIXME that char* is evil. Was going to
945 add FIXME about evil locale-specific string.h strncmp, but just
946 switched to wacky string-as-uint32 optimization. Move check for
947 "no room for field name" above get_const_data_len() to avoid
948 assertion failure in get_const_data_len if we have trailing 2
949 bytes or the like. Check for service and name fields being
950 provided twice. Don't leak service/name on error. Require field
951 names to be aligned to 4 bytes.
953 * dbus/dbus-marshal.c: move byte swap stuff to header
954 (_dbus_pack_int32): uscore-prefix
955 (_dbus_unpack_int32): uscore-prefix
956 (_dbus_unpack_uint32): export
957 (_dbus_demarshal_string): add @todo complaining about use of
959 (_dbus_marshal_get_field_end_pos): add @todo about bad error
960 handling allowing corrupt data to go unchecked
962 2003-01-08 Havoc Pennington <hp@redhat.com>
964 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
965 to the select() as needed for authentication. (should be using
966 _dbus_poll() not select, but for another day)
968 * dbus/dbus.h: include dbus/dbus-protocol.h
970 2003-01-08 Anders Carlsson <andersca@codefactory.se>
972 * dbus/Makefile.am (dbusinclude_HEADERS): Install
975 2003-01-08 Anders Carlsson <andersca@codefactory.se>
977 * dbus/dbus-internals.c: (_dbus_type_to_string):
978 New function that returns a string describing a type.
980 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
981 * dbus/dbus-marshal.h:
982 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
983 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
984 (dbus_message_iter_get_byte_array):
985 * dbus/dbus-message.h:
986 Add new convenience functions for appending and getting message fields.
987 Also add demarshalling routines for byte arrays.
989 2003-01-07 Anders Carlsson <andersca@codefactory.se>
991 * dbus/dbus-connection-internal.h:
992 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
993 (_dbus_connection_get_next_client_serial),
994 (dbus_connection_send_message):
995 * dbus/dbus-internals.h:
996 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
997 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
998 (_dbus_marshal_uint32), (_dbus_demarshal_double),
999 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
1000 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
1001 (_dbus_verbose_bytes), (_dbus_marshal_test):
1002 * dbus/dbus-marshal.h:
1003 * dbus/dbus-message-internal.h:
1004 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
1005 (dbus_message_write_header), (_dbus_message_lock),
1006 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
1007 (dbus_message_get_name), (dbus_message_append_int32),
1008 (dbus_message_append_uint32), (dbus_message_append_double),
1009 (dbus_message_append_string), (dbus_message_append_byte_array),
1010 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
1011 (dbus_message_iter_unref), (dbus_message_iter_has_next),
1012 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
1013 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
1014 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
1015 (decode_header_data), (_dbus_message_loader_return_buffer),
1016 (message_iter_test), (_dbus_message_test):
1017 * dbus/dbus-message.h:
1018 * dbus/dbus-protocol.h:
1019 * dbus/dbus-test.c: (main):
1021 * glib/test-dbus-glib.c: (message_handler), (main):
1022 * test/echo-client.c: (main):
1023 * test/watch.c: (check_messages):
1024 Make messages sendable and receivable for real.
1026 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1028 * dbus/dbus-marshal.c: (_dbus_marshal_double),
1029 (_dbus_marshal_string), (_dbus_marshal_byte_array):
1030 * dbus/dbus-message.c: (dbus_message_append_int32),
1031 (dbus_message_append_uint32), (dbus_message_append_double),
1032 (dbus_message_append_string), (dbus_message_append_byte_array):
1033 Handle OOM restoration.
1035 2003-01-07 Anders Carlsson <andersca@codefactory.se>
1037 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1038 (_dbus_demarshal_string), (_dbus_marshal_test):
1039 * dbus/dbus-marshal.h:
1040 * dbus/dbus-message.c: (dbus_message_get_name),
1041 Document these functions.
1043 (dbus_message_append_int32), (dbus_message_append_uint32),
1044 (dbus_message_append_double), (dbus_message_append_string),
1045 (dbus_message_append_byte_array):
1046 * dbus/dbus-message.h:
1047 Add functions for adding message fields of different types.
1049 * dbus/dbus-protocol.h:
1050 Add the different types.
1052 2003-01-05 Havoc Pennington <hp@pobox.com>
1054 * bus/connection.c: implement routines for handling connections,
1055 first thing is keeping a list of owned services on each connection
1056 and setting up watches etc.
1058 * bus/services.c: implement a mapping from service names to lists
1061 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
1063 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
1064 to use static mutexes for global data
1066 * dbus/dbus-connection.c (dbus_connection_set_data): add new
1067 collection of functions to set/get application-specific data
1068 on the DBusConnection.
1070 2003-01-04 Havoc Pennington <hp@pobox.com>
1072 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
1073 (_dbus_poll): new function
1075 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
1078 * bus/loop.c: initial code for the daemon main loop
1080 2003-01-04 Havoc Pennington <hp@pobox.com>
1082 * test/watch.c (error_handler): make it safe if the error handler
1083 is called multiple times (if we s/error handler/disconnect
1084 handler/ we should just guarantee it's called only once)
1086 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
1087 error handler on disconnect (it's quite possible we should
1088 just change the error handler to a "disconnect handler," I'm
1089 not sure we have any other meaningful errors)
1091 * configure.in: check for getpwnam_r
1093 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
1094 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
1095 mechanism as in SASL spec, using socket credentials
1097 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
1098 (_dbus_send_credentials_unix_socket): new function
1100 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
1102 (_dbus_write): only check errno if <0 returned
1103 (_dbus_write_two): ditto
1105 2003-01-02 Anders Carlsson <andersca@codefactory.se>
1107 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
1108 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
1109 (_dbus_marshal_test):
1110 * dbus/dbus-marshal.h:
1111 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
1112 to _dbus_marshal_utf8_string. Also fix some tests.
1114 2002-12-28 Harri Porten <porten@kde.org>
1116 * configure.in: added check for C++ compiler and a very cheesy
1117 check for the Qt integration
1119 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
1121 * qt/Makefile.am: added
1123 * qt/.cvsignore: added
1125 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
1126 latter, added #ifdef QT_THREAD_SUPPORT guard.
1128 * dbus/Makefile.am: added missing headers for make dist
1130 2002-12-28 Kristian Rietveld <kris@gtk.org>
1132 * dbus/Makefile.am: fixup export-symbols-regex.
1134 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1136 * acinclude.m4: Add this file and put the
1137 PKG_CHECK_MODULE macro in it.
1139 2002-12-27 Anders Carlsson <andersca@codefactory.se>
1141 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1142 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1143 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1144 (_dbus_marshal_test):
1145 Make the demarshalling routines align the pos argument.
1146 Add string marshalling tests and fix the obvious bugs
1149 2002-12-26 Havoc Pennington <hp@pobox.com>
1151 * dbus/dbus-auth.c: fixes fixes fixes
1153 * dbus/dbus-transport-unix.c: wire up support for
1154 encoding/decoding data on the wire
1156 * dbus/dbus-auth.c (_dbus_auth_encode_data)
1157 (_dbus_auth_decode_data): append to target string
1158 instead of nuking it.
1160 2002-12-26 Havoc Pennington <hp@pobox.com>
1162 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
1163 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
1166 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
1167 avoid swap_bytes() overhead (ignoring possible assembly stuff for
1168 now). Main point is because I wanted unpack_uint32 to implement
1170 (_dbus_verbose_bytes): new function
1172 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
1174 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
1175 mechanism to handle a corrupt message stream
1176 (_dbus_message_loader_new): fix preallocation to only prealloc,
1179 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
1180 (_dbus_string_test): enhance tests for copy/move and fix the
1183 * dbus/dbus-transport-unix.c: Hold references in more places to
1184 avoid reentrancy problems
1186 * dbus/dbus-transport.c: ditto
1188 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
1189 leak reference count in no-message case
1191 * test/watch.c (do_mainloop): handle adding/removing watches
1192 during iteration over the watches. Also, ref the connection/server
1193 stored on a watch, so we don't try to mangle a destroyed one.
1195 * dbus/dbus-transport-unix.c (do_authentication): perform
1198 * dbus/dbus-auth.c (get_state): add a state
1199 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
1200 (_dbus_auth_get_unused_bytes): append the unused bytes
1201 to the passed in string, rather than prepend
1203 * dbus/dbus-transport.c (_dbus_transport_init_base): create
1204 the auth conversation DBusAuth
1206 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
1207 (_dbus_transport_new_for_domain_socket): when creating a
1208 transport, pass in whether it's a client-side or server-side
1209 transport so we know which DBusAuth to create
1211 2002-12-03 Havoc Pennington <hp@pobox.com>
1213 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
1214 _after_ finalizing the derived members
1215 (unix_connection_set): unref watch if we fail to add it
1217 * dbus/dbus-connection.c (dbus_connection_unref): delete the
1218 transport first, so that the connection owned by the
1219 transport will be valid as the transport finalizes.
1221 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
1222 if necessary, and remove watches from the connection.
1224 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
1226 2002-12-26 Anders Carlsson <andersca@codefactory.se>
1228 * dbus/dbus-marshal.c: (_dbus_marshal_string),
1229 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1230 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
1231 (_dbus_marshal_test):
1232 * dbus/dbus-marshal.h:
1233 Add string marshal functions and have the demarshal functions
1234 return the new position.
1236 2002-12-25 Havoc Pennington <hp@pobox.com>
1238 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
1239 it is a simple protocol that just maps directly to SASL.
1241 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
1242 initial implementation, not actually used yet.
1244 * dbus/dbus-string.c (_dbus_string_find): new function
1245 (_dbus_string_equal): new function
1246 (_dbus_string_base64_encode): new function
1247 (_dbus_string_base64_decode): new function
1249 2002-12-25 Anders Carlsson <andersca@codefactory.se>
1252 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
1253 (_dbus_marshal_int32), (_dbus_marshal_uint32),
1254 (_dbus_demarshal_double), (_dbus_demarshal_int32),
1255 (_dbus_demarshal_uint32), (_dbus_marshal_test):
1256 * dbus/dbus-marshal.h:
1257 * dbus/dbus-protocol.h:
1258 * dbus/dbus-test.c: (main):
1260 Add un-optimized marshalling/demarshalling routines.
1262 2002-12-25 Harri Porten <porten@kde.org>
1264 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
1266 2002-12-24 Zack Rusin <zack@kde.org>
1268 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
1269 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
1272 2002-12-24 Havoc Pennington <hp@pobox.com>
1274 * glib/dbus-gthread.c: fix include
1276 * glib/dbus-glib.h: rename DBusMessageHandler for now.
1277 I think glib API needs to change, though, as you don't
1278 want to use DBusMessageFunction, you want to use the
1279 DBusMessageHandler object. Probably
1280 dbus_connection_open_with_g_main_loop()
1281 and dbus_connection_setup_g_main_loop() or something like that
1282 (but think of better names...) that just create a connection
1283 that has watch/timeout functions etc. already set up.
1285 * dbus/dbus-connection.c
1286 (dbus_connection_send_message_with_reply): new function just to
1287 show how the message handler helps us deal with replies.
1289 * dbus/dbus-list.c (_dbus_list_remove_last): new function
1291 * dbus/dbus-string.c (_dbus_string_test): free a string that
1294 * dbus/dbus-hash.c: use memory pools for the hash entries
1295 (rebuild_table): be more paranoid about overflow, and
1296 shrink table when we can
1297 (_dbus_hash_test): reduce number of sprintfs and write
1298 valid C89. Add tests for case where we grow and then
1299 shrink the hash table.
1301 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
1303 * dbus/dbus-connection.c (dbus_connection_register_handler)
1304 (dbus_connection_unregister_handler): new functions
1306 * dbus/dbus-message.c (dbus_message_get_name): new
1308 * dbus/dbus-list.c: fix docs typo
1310 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
1311 an object representing a handler for messages.
1313 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1316 * glib/dbus-gthread.c: (dbus_gthread_init):
1317 Don't use the gdbus prefix for public functions.
1319 2002-12-16 Anders Carlsson <andersca@codefactory.se>
1323 Add GLib checks and fixup .pc files
1327 * glib/dbus-gmain.c: (gdbus_connection_prepare),
1328 (gdbus_connection_check), (gdbus_connection_dispatch),
1329 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
1330 (dbus_connection_gsource_new):
1331 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
1332 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
1333 * glib/test-dbus-glib.c: (message_handler), (main):
1336 2002-12-15 Harri Porten <porten@kde.org>
1338 * autogen.sh: check for libtoolize before attempting to use it
1340 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
1343 * .cvsignore: ignore more stamp files
1345 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
1347 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
1348 without make install.
1350 2002-12-15 Havoc Pennington <hp@pobox.com>
1352 * dbus/dbus-threads.c: add thread stubs that a higher library
1353 layer can fill in. e.g. the GLib wrapper might fill them in with
1354 GThread stuff. We still need to use this thread API to
1355 thread-safe-ize the library.
1357 2002-12-12 Havoc Pennington <hp@pobox.com>
1359 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
1360 below new interfaces and include fewer system headers.
1362 * dbus/dbus-sysdeps.c (_dbus_read): new function
1363 (_dbus_write): new function
1364 (_dbus_write_two): new function
1365 (_dbus_connect_unix_socket): new function
1366 (_dbus_listen_unix_socket): new function
1368 * dbus/dbus-message-internal.h: change interfaces to use
1371 2002-12-11 Havoc Pennington <hp@pobox.com>
1373 * dbus/dbus-types.h: add dbus_unichar
1375 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
1377 * dbus/dbus-connection.c (dbus_connection_send_message): return
1380 * dbus/dbus-transport.c: include dbus-watch.h
1382 * dbus/dbus-connection.c: include dbus-message-internal.h
1384 * HACKING: add file with coding guidelines stuff.
1386 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
1387 handling here, for security purposes (as in vsftpd). Not actually
1388 using this class yet.
1390 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
1391 system/libc usage here, as in vsftpd, for ease of auditing (and
1392 should also simplify portability). Haven't actually moved all the
1393 system/libc usage into here yet.
1395 2002-11-25 Havoc Pennington <hp@pobox.com>
1397 * dbus/dbus-internals.c (_dbus_verbose): fix to not
1398 always print the first verbose message.
1400 2002-11-24 Havoc Pennington <hp@pobox.com>
1402 * test/echo-client.c, test/echo-server.c: cheesy test
1405 * configure.in (AC_CHECK_FUNCS): check for writev
1407 * dbus/dbus-message.c (_dbus_message_get_network_data): new
1410 * dbus/dbus-list.c (_dbus_list_foreach): new function
1412 * dbus/dbus-internals.c (_dbus_verbose): new function
1414 * dbus/dbus-server.c, dbus/dbus-server.h: public object
1415 representing a server that listens for connections.
1417 * dbus/.cvsignore: create
1419 * dbus/dbus-errors.h, dbus/dbus-errors.c:
1420 public API for reporting errors
1422 * dbus/dbus-connection.h, dbus/dbus-connection.c:
1423 public object representing a connection that
1424 sends/receives messages. (Same object used for
1425 both client and server.)
1427 * dbus/dbus-transport.h, dbus/dbus-transport.c:
1428 Basic abstraction for different kinds of stream
1429 that we might read/write messages from.
1431 2002-11-23 Havoc Pennington <hp@pobox.com>
1433 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
1436 * dbus/dbus-test.c (main): add list test, and include
1437 dbus-test.h as intended
1439 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
1440 (_dbus_hash_table_remove_int): return value indicates
1441 whether the entry existed to remove
1443 * dbus/dbus-list.c: add linked list utility class,
1446 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
1449 2002-11-23 Havoc Pennington <hp@pobox.com>
1451 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
1452 DBUS_END_DECLS to nothing, that should fix this once and for all
1454 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
1456 * dbus/dbus-message.c, dbus/dbus-hash.c:
1457 add some missing @brief
1459 2002-11-23 Havoc Pennington <hp@pobox.com>
1461 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
1462 to avoid confusing Doxygen
1464 * dbus/dbus-hash.c: @} not }@
1466 * dbus/dbus-message.c (struct DBusMessage): split out
1469 2002-11-23 Havoc Pennington <hp@pobox.com>
1471 * configure.in: pile on more warning flags if using gcc
1473 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
1474 to document static functions
1476 * configure.in: add summary to end of configure so it
1477 looks nice and attractive
1479 * dbus/dbus-hash.c: finish implementation and write unit
1482 * configure.in: add --enable-tests to enable unit tests
1484 * dbus/dbus-test.c: test program to run unit tests
1485 for all files in dbus/*, initially runs a test for
1488 * dbus/dbus-internals.h: file to hold some internal utility stuff
1490 2002-11-22 Havoc Pennington <hp@redhat.com>
1492 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
1493 "ported" away from Tcl
1495 * dbus/dbus-types.h: header for types such as dbus_bool_t
1497 2002-11-22 Havoc Pennington <hp@redhat.com>
1499 * dbus/dbus.h: fixups for doc warnings
1501 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
1503 (QUIET): make it quiet so we can see warnings
1505 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
1507 2002-11-22 Havoc Pennington <hp@redhat.com>
1509 * Makefile.am: include "Doxyfile" target in all-local
1511 * configure.in: generate the Doxyfile
1513 * Doxyfile.in: move Doxyfile here, so we can use
1514 configure to generate a Doxyfile with the right
1517 2002-11-22 Havoc Pennington <hp@redhat.com>
1519 * dbus/dbus-message.c: move inline docs into .c file
1521 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
1522 so all docs are under doc/
1523 (MAN_EXTENSION): generate man pages. Use extension
1524 ".3dbus" which matches ".3qt" on my system,
1525 I guess this is OK, I don't know really.
1526 (FILE_PATTERNS): look for .c files not .h, makes sense
1529 2002-11-22 Havoc Pennington <hp@pobox.com>
1531 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
1532 because any app can be a server, and any app can be a client,
1533 the bus is a special kind of server.
1535 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
1537 * Doxyfile : adding. Still needs Makefile rules to be generated
1538 automatically (just run "doxygen" in the toplevel dir for now to
1541 * dbus/dbus-message.h : Adding sample docs (javadoc since
1542 resembles gtk-doc a little more)
1544 * dbus/dbus.h : Adding sample docs
1546 2002-11-21 Havoc Pennington <hp@redhat.com>
1548 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
1549 so we can allow ourselves to include files directly,
1550 instead of having to use dbus.h
1552 * dbus/dbus.h: fill in
1554 * dbus/dbus-message.h: sketch out a sample header file.
1555 Include griping if you include it directly instead of
1558 * dbus/dbus-macros.h: new file with macros for extern "C",
1559 TRUE/FALSE, NULL, etc.
1561 * doc/file-boilerplate.c: put include guards in here
1563 2002-11-21 Havoc Pennington <hp@redhat.com>
1565 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
1567 * COPYING: include the GPL as well, and license code
1568 under both AFL and GPL.
1570 2002-11-21 Havoc Pennington <hp@redhat.com>
1572 * acconfig.h: get rid of this
1574 * autogen.sh (run_configure): add --no-configure option
1576 * configure.in: remove AC_ARG_PROGRAM to make
1577 autoconf complain less. add AC_PREREQ.
1578 add AC_DEFINE third arg.
1580 2002-11-21 Anders Carlsson <andersca@codefactory.se>
1583 Fix references so we can distcheck.
1585 2002-11-21 Havoc Pennington <hp@redhat.com>
1587 * Initial module creation