1 2005-11-07 Robert McQueen <robot101@debian.org>
3 * python/_dbus.py: Add WeakReferenceDictionary cache of dbus.Bus
4 instances to stop madness of creating new instances representing
5 the same bus connection all the time, rendering any tracking of
6 match rules and bus names quite meaningless. Caught a bug where
7 the private argument to SessionBus() and friends was being passed
8 in as use_default_mainloop by mistake. Still some problems with
9 multiple dbus_binding.Connection instances representing the same
10 low-level connection (eg when you use both SessionBus() and
11 StarterBus() in same process), but it's a lot better now than it
14 * python/dbus_bindings.pyx: Add constants with the return values
15 for bus_request_name().
17 * python/service.py: Store bus name instances in a per-dbus.Bus cache
18 and retrieve the same instances for the same name, so deletion can be
19 done with refcounting. Also now throws some kind of error if you
20 don't actually get the name you requested, unlike previously...
22 * test/python/test-client.py: Add tests for instance caching of buses
25 2005-11-04 Robert McQueen <robot101@debian.org>
27 * python/dbus_bindings.pyx, test/python/test-client.py: Fix
28 marshalling of boolean values. Add some booleans to the values in
31 * python/decorators.py, python/service.py: Add an 'async_callbacks'
32 argument to the dbus.service.method decorator, which allows you to
33 name arguments to take two callback functions for replying with
34 return values or an exception.
36 * test/python/test-client.py, test/python/test-service.py: Add test
37 case using asynchronous method reply functions, both return values and
38 errors, and from within both the function itself and from a mainloop
41 * python/decorators.py, python/service.py: Perform checking that the
42 number of method/signal arguments matches the number of types in the
43 signature at class loading time, not when you first introspect the
46 * python/service.py: Remove debug print left by the last commit.
48 2005-11-03 Robert McQueen <robot101@debian.org>
50 * python/service.py: Heavy refactoring of method invocation, with
51 hopefully no effect on functionality. Nuked _dispatch_dbus_method_call
52 in favour of a new _message_cb that uses seperate functions for
53 looking up the method to call, marshalling the return values, and
54 sending exceptions as errors, and is easier to follow as a
55 consequence. Fixes some corner cases about returning things that
56 don't match your declared out_signature, allows exceptions to define
57 _dbus_error_name and have it be sent over the bus as the error name,
58 and paves the way for cool stuff like heeding the message no reply
59 flag, asynchronous method implementations, informing the method of the
60 sender, and including backtraces in the error messages.
62 * test/python/test-client.py: Catch and print exceptions thrown in the
63 async callback tests, rather than passing them to the low-level
64 bindings to be ignored in a noisy and frustrating manner.
66 2005-11-03 Robert McQueen <robot101@debian.org>
68 * python/_dbus.py, python/proxies.py, python/service.py: Add __repr__
69 functions to dbus.Bus, dbus.service.BusName and dbus.service.Object,
70 tweak others to be consistent.
72 * test/python/test-client.py: Tweak output of testInheritance.
74 2005-10-29 Robert McQueen <robot101@debian.org>
76 * python/service.py: Major changes to allow multiple inheritance
77 from classes that define D-Bus interfaces:
79 1. Create a new Interface class which is the parent class of
80 Object, and make the ObjectType metaclass into InterfaceType.
82 2. Patch written with Rob Taylor to replace use of method_vtable
83 with code that walks the class's __MRO__ (method resolution order)
84 to behave like Python does when invoking methods and allow
85 overriding as you'd expect. Code is quite tricky because
86 we have to find two methods, the one to invoke which has the
87 right name and isn't decorated with the /wrong/ interface,
88 and the one to pick up the signatures from which is decorated
89 with the right interface.
91 The same caveats apply as to normal multiple inheritance -
92 this has undefined behaviour if you try and inherit from two
93 classes that define a method with the same name but are
94 decorated with different interfaces. You should decorate
95 your overriding method with the interface you want.
97 3. Replace grungy introspection XML generation code in the metaclass
98 with dictionaries that cope correctly with multiple inheritance
99 and the overriding of methods. This also uses the signature
100 decorations to provide correct introspection data, including
101 the debut appearance of the types of your return values. :D
103 * test/python/test-client.py, test/python/test-service.py: Add a test
104 case to try invoking an method that overrides one inherited from a
105 D-Bus interface class.
107 2005-10-29 Robert McQueen <robot101@debian.org>
109 * python/dbus_bindings.pyx: Tweak 'raise AssertionError' to assert().
110 Add checking for the end of struct character when marshalling a
111 struct in MessageIter.append_strict.
113 * python/examples/example-service.py,
114 python/examples/gconf-proxy-service.py,
115 python/examples/gconf-proxy-service2.py: Update to use gobject
116 mainloop directly rather than appearing to depend on gtk.
118 * python/test/test-client.py, python/test/test-server.py: Remove
119 obsolete and broken test scripts for old bindings. We have up to date
120 and working tests in test/python/.
122 2005-10-29 Robert McQueen <robot101@debian.org>
124 * python/decorators.py: Add optional arguments to the method and
125 signal decorators to allow you to specify the signature of arguments
126 and return values. Preserve the doc strings of signal functions in the
127 decorated version, for pydoc and friends.
129 * python/dbus_bindings.pyx, python/proxies.py: Replace the
130 parse_signature_block function with an iterable dbus.Signature()
131 type. Fix a bug in MessageIter.append_strict where you could append
132 anything by claiming it was a string.
134 * python/service.py: Use the out_signature decoration on methods to
135 marshal return values, meaning you no longer require dbus.Array()
136 or dbus.Dictionary() to indicate the type when returning empty
137 arrays or dictionaries. Fix a bug where exceptions which are defined
138 in __main__ are not turned into error replies.
140 * test/python/test-client.py, test/python/test-service.py: Add test
141 for correct marshalling of return values according to out_signature.
142 Fix a bug in the async call test where the error_handler is missing a
145 2005-10-29 Robert McQueen <robot101@debian.org>
147 * glib/Makefile.am, glib/examples/Makefile.am,
148 glib/examples/statemachine/Makefile.am: Merge patch from Ubuntu by
149 Daniel Stone to replace explicit calls to libtool with $(LIBTOOL).
151 * test/python/.cvsignore: Add run-with-tmp-session-bus.conf.
153 * tools/dbus-monitor.1, tools/dbus-monitor.c: Merge dbus-monitor patch
154 from Ubuntu by Daniel Silverstone to allow specifying match rules on
157 2005-10-27 Ross Burton <ross@openedhand.com>
159 * dbus/dbus-marshal-header.c:
162 * glib/dbus-gobject.c:
163 Stop compiler warning.
165 2005-10-25 Ross Burton <ross@openedhand.com>
168 * dbus/dbus-server-unix.c:
169 * dbus/dbus-transport-unix.c:
171 * glib/dbus-gobject.c:
172 Add some const keywords.
174 2005-10-25 Ross Burton <ross@openedhand.com>
176 * doc/dbus-specification.xml:
177 Document the NoReply annotation.
179 * glib/dbus-binding-tool-glib.h:
180 * glib/dbus-binding-tool-glib.c:
181 Respect the NoReply annotation.
183 2005-10-24 Robert McQueen <robot101@debian.org>
185 * python/dbus_bindings.pyx (String, MessageIter): make D-Bus strings
186 derive from unicode instead of str, and encode/decode UTF-8 when
187 marshalling/unmarshalling bus messages
189 * python/introspect_parser.py: encode introspection data as UTF-8
190 before passing the buffer into libxml2
192 * test/python/test-client.py: add unicode test strings
194 * test/data/valid-service-files/.cvsignore, test/python/.cvsignore:
195 ignore generated python test files
197 2005-10-17 John (J5) Palmieri <johnp@redhat.com>
199 * glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdouble
200 and G_TYPE_VALUE_ARRAY (DBUS_TYPE_STRUCT)
201 (gvalue_from_hash_value, hash_value_from_gvalue): handle gdouble
203 * glib/dbus-gvalue.c (dbus_gvalue_to_signature): add missing
204 DBUS_STRUCT_BEGIN_CHAR and DBUS_STRUCT_END_CHAR charaters
205 when constructing struct signatures
207 * python/_dbus.py (Bus): handle private connections using the
208 private keyword in the constructor. defaults to private=False
209 (Bus::close): new method to close a connection to the bus
211 * python/dbus_bindings.pyx (Connection::close): renamed method
212 was previously called disconnect
213 (bus_get): now supports getting a private connection
215 * python/proxies.py (ProxyMethod::__call__): check if ignore_reply
216 keyword is set to True. if it is, execute the method without waiting
218 (ProxyObject::_introspect_execute_queue): new method for executing
219 all the pending methods that were waiting for the introspect to
220 finish. this is called when introspect either succeeds or fails
221 (ProxyObject::_introspect_error_handler): call queued methods
223 2005-10-14 John (J5) Palmieri <johnp@redhat.com>
225 * python/dbus_bindings.pyx (MessageIter::append_strict): check for
226 STRUCT_BEGIN not TYPE_STRUCT in indicate we are marshalling a struct
228 * python/service.py (Object::_message_cb): handle exceptions correctly
229 by sending them over the wire to the calling app. This makes sure
230 the client returns immediately instead of waiting the 15 seconds to
233 * test/python/test-client.py (TestDBusBindings::testBenchmarkIntrospect):
234 Add a test to benchmark how long it takes to introspect a service and
235 call a method which returns a large element (pretty fast)
237 * test/python/test-service.py (TestObject::GetComplexArray): new test
238 method which pushes a lot of data
240 2005-10-13 John (J5) Palmieri <johnp@redhat.com>
242 * python/service.py(ObjectType::_reflect_on_signal, _reflect_on_method):
243 reclaim memory outside of the loop and use del istead of just setting
246 2005-10-13 John (J5) Palmieri <johnp@redhat.com>
248 * python/service.py (ObjectType::_reflect_on_signal): Always close
249 signal tag even when there are no arguments
251 2005-10-13 John (J5) Palmieri <johnp@redhat.com>
253 * configure.in: Set mono, mono-docs and Qt3 to default
254 to no instead of auto when building. These bindings do not
255 have full time maintainers and will not be supported for the
258 2005-10-12 John (J5) Palmieri <johnp@redhat.com>
260 patches from Michael Krivoruchko <misha at sun.com>:
262 * dbus/dbus-connection.c (_dbus_connection_queue_received_message_link,
263 _dbus_connection_message_sent,
264 _dbus_connection_send_preallocated_unlocked_no_update,
265 _dbus_connection_pop_message_link_unlocked): handle the case when path
266 is NULL when calling _dbus_verbose
268 * configure.in: check for functions getpeerucred and getpeereid
270 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): provides
271 support of auth EXTERNAL on Solaris 10+ (getpeerucred), FreeBSD 4.6+,
272 OpenBSD 3.0+ and FreeBSD 5.0+ as well as MacOSX 10.2+ (getpeereid).
273 Patch was only tested on Solaris 10 x86 so it might be issues
274 with other platforms (i.e. BSDs and MacOSX)
277 2005-10-05 John (J5) Palmieri <johnp@redhat.com>
279 * glib/dbus-gvalue.c (marshal_variant): call _dbus_gvalue_marshal
280 instead of marshal basic so we can handle recursive types in a variant
282 * test/glib/test-dbus-glib.c: Add test for marshaling recurive types
285 * test/glib/test-service-glib.c, test-service-glib.xml
286 (my_object_echo_variant [EchoVariant],
287 my_object_process_variant_of_array_of_ints123
288 [ProcessVariantOfArrayOfInts123]):
291 * python/introspect_parser.py: New module for parsing introspect
294 * python/dbus_bindings.pyx:
295 (various places): when throwing errors fix to use errormsg instead
296 of message local variable because Pyrex can get confused with other
297 message variables (initial patch by Robert McQueen
298 <robert.mcqueen at collabora.co.uk>)
299 (MessageIter::parse_signature_block): new method for getting the next
300 block in a signiture.
301 (MessageIter::append_strict): new method for appending values strictly
302 using the passed in signature instead of guessing at the type
303 (MessageItter:: append_dict, append_struct, append_array): use
304 signatures to marshal children if the signature is available
306 * python/exceptions.py (IntrospectionParserException): new exception
308 * python/proxies.py (ProxyMethod::__call__): Marshal args with
309 introspected signatures if available, else we fall back to the
310 old way of doing things.
311 (ProxyObject::_introspect_reply_handler ): parse introspection data
313 * python/service.py (ObjectType::_reflect_on_method): Properly
314 terminate <method> if there are no args in the reflection data
316 * test/python/test-client.py: add tests for talking with the GLib
317 test server. This gives us better coverage for introspection since
318 python to python will always generate arguments as variants. It also
319 allows us to test the robustness of the GLib bindings and interlanguage
323 2005-10-03 John (J5) Palmieri <johnp@redhat.com>
325 * bus/driver.c (bus_driver_handle_introspect): Add signals
326 to the introspect data. (patch from Daniel P. Berrange
327 <dan at berrange.com>)
329 * bus/dispatch.c (check_existent_ping): Add testcase for Ping
331 * dbus/dbus-connection.c (_dbus_connection_peer_filter,
332 _dbus_connection_run_builtin_filters): Changed these to
333 be unlock_no_update functions and call
334 _dbus_connection_send_unlocked_no_update instead of
335 dbus_connection_send to avoid locking errors.
337 * doc/TODO: Removed the make Ping test TODO
339 2005-09-26 John (J5) Palmieri <johnp@redhat.com>
341 * dbus/Python.pyx: Fixed memory leaks when throwing errors.
342 We now copy the message from a DBusError and then free
343 the error object befor throwing the error
345 * glib/dbus-glib-tool.c: removed extra comma at the end of the
346 DBusBindingOutputMode enum which was causing a warning.
347 #include <time.h> so using time_t is explicitly defined
349 2005-09-26 John (J5) Palmieri <johnp@redhat.com>
351 * Integrate patches from Lennart Poettering <mzsqb at 0pointer.de>:
353 (internal_bus_get): new method that take over the heavy lifting
354 of dbus_bus_get and adds the ability to get a private connection
356 (dbus_bus_get): wrapper to internal_bus_get that provides the same
357 interface as in previous versions
358 (dbus_bus_get_private): new method that is a wrapper to
359 internal_bus_get to get a private connection to the bus
362 (dbus_bus_get_private): add as a public libdbus interface
364 - dbus-1.pc.in: output system_bus_default_address and
365 sysconfdir variables so apps can use them when compiling
367 2005-09-23 Harald Fernengel <harry@kdevelop.org>
368 * dbus/qt: New Qt bindings
370 2005-09-12 Waldo Bastian <bastian@kde.org>
372 * dbus/dbus-marshal-validate.c,
373 doc/dbus-specification.xml, test/Makefile.am,
374 test/test-names.c: allow hyphens in bus names.
376 2005-09-11 Mark McLoughlin <mark@skynet.ie>
378 * test/data/auth/fallback.auth-script: we don't
379 retry the EXTERNAL method when we know its going
382 2005-09-11 Mark McLoughlin <mark@skynet.ie>
384 * dbus/dbus-connection-internal.h: rename
385 (add|remove|toggle)_(watch|timeout) to unlocked()
387 * dbus/dbus-connection.c: ditto.
389 * dbus/dbus-timeout.c, dbus/dbus-transport-unix.c:
390 Update some callers for the renaming.
392 2005-09-10 Mark McLoughlin <mark@skynet.ie>
394 * dbus/dbus-auth.c: (record_mechanisms): don't
395 retry the first auth mechanism because we know
396 we're just going to get rejected again.
398 * dbus/dbus-keyring.c: (_dbus_keyring_reload):
399 Fix thinko ... and what a nasty little bugger to
400 track down you were ...
402 * dbus/dbus-connection.c:
403 (_dbus_connection_add_watch),
404 (_dbus_connection_remove_watch): add note about
405 these needing the connection to be locked.
406 (_dbus_connection_get_dispatch_status_unlocked):
407 set status to DATA_REMAINS when we queue the
408 disconnected message.
411 (bus_dispatch): fix warning.
412 (check_existent_service_no_auto_start):
413 Expect ChildSignaled error too.
414 (check_existent_hello_from_self): fix another
417 2005-09-08 Joe Shaw <joeshaw@novell.com>
419 Patches from James Willcox <snorp@snorp.net>
421 * mono/Makefile.am: Add Int16.cs and UInt16.cs
423 * mono/DBusType/Array.cs: Handle multidimensional arrays, and
424 support array "out" parameters.
426 * mono/DBusType/Int16.cs, mono/DBusType/UInt16.cs: New files,
427 for 16-bit int support.
429 2005-09-06 John (J5) Palmieri <johnp@redhat.com>
433 * Patch from Steve Grubb:
434 - bus/activation.c (bus_activation_service_reload_test): clean up
436 - dbus/dbus-keyring.c (_dbus_keyring_reload): fix conditional
437 - dbus/dbus-message-factory.c (generate_special): fix a couple of
438 buffer overflows in the test suite. This is non critical because
439 it can not be exploited and this code is only run when doing a
442 * Patch from Yaakov Selkowitz: Build fixes for Cygwin
443 - configure.in: Don't check and link against kdecore, only qt headers
444 - dbus/Makefile.am: Add -no-undefined to libdbus_1_la_LDFLAGS
445 - gcj/org/freedesktop/dbus/Makefile.am:
446 add libdbus_gcj_1_la_LDFLAGS = -no-undefined
447 - glib/Makefile.am: Add -no-undefined to libdbus_glib_1_la_LDFLAGS
448 and $(DBUS_GLIB_LIBS) to dbus_binding_tool_LDADD
449 - qt/Makefile.am: Add -no-undefined to libdbus_qt_1_la_LDFLAGS
450 - tools/Makefile.am: Add platform extentions to binaries
451 (i.e. .exe on windows)
454 - Make it so if no suitable version of python is found we only
455 disable building python instead of exiting the configure script
456 - Require version 2.4 of glib for glib bindings
459 * python/__init__.py: Sync version with libdbus to (0,50,0)
461 2005-09-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
463 * dbus/dbus-object-tree.c (find_subtree_recurse):
464 a couple of optimizations (bug #710):
465 - do a binary search in the tree
466 - insert a new child at the right place directly, no need for
468 - do the "double alloc" thing when allocating children
470 2005-08-31 John (J5) Palmieri <johnp@redhat.com>
472 * python/Makefile.am: Break on pyrexc errors instead of ignoring them
474 * python/dbus_bindings.pyx: Memory management foo
475 (global): remove hacky _user_data_references global list
476 (GIL_safe_cunregister_function_handler): userdata now stuffed into
477 tuples. Unref user_data
478 (GIL_safe_cmessage_function_handler): userdata now stuffed into tuples
479 (Connection::__del__): Remove and replace with __dealloc__ method
480 (Connection::add_filter): Stuff user_data into a tuple. Use Py_INCREF
481 to keep tuple from being deallocated instead of the global var hack
482 (Connection::register_object_path): Stuff user_data into a tuple.
483 Use Py_INCREF to keep tuple from being deallocated instead of the
485 (Connection::register_fallback): Stuff user_data into a tuple.
486 Use Py_INCREF to keep tuple from being deallocated instead of the
488 (GIL_safe_pending_call_notification): Don't unref the message
489 because it gets unreffed when going out of scope. Py_XDECREF
491 (PendingCall::__del__): Remove and replace with __dealloc__ method
492 (PendingCall::set_notify): ref the pending call because we will
493 need it to stick around for when the notify callback gets called
494 (Message::__del__): Remove and replace with __dealloc__ method
496 * python/dbus_glib_bindings.pyx (init_gthreads): Changed to
497 gthreads_init to match up with the dbus call
499 * python/glib.py (init_threads): Changed to threads_init to match
500 up with gobject.threads_init(). init_threads is kept for backwards
501 compat but will most likely be deprecated in the future
503 * test/python/test-client.py:
504 - revamp to use Python's unittest functionality
505 - add async call tests
506 - setup threads in glib and dbus so we make sure locks are working
508 2005-08-30 John (J5) Palmieri <johnp@redhat.com>
510 * python/dbus_bindings.pyx
511 (_pending_call_notification, cunregister_function_handler,
512 cmessage_function_handler): All callback functions have been rearranged
513 to workaround a bug in Pyrex when working with the GIL which is Python's
514 global lock when dealing with threads. They have been split into
515 a wrapper function (which assumes the name of the old function) and
516 a _GIL_safe_<function name> function which contains the functionality
517 of the old function. This ensures that Pyrex does not write code
518 the lock is released.
521 2005-08-30 John (J5) Palmieri <johnp@redhat.com>
523 * python/dbus_bindings.pyx (_pending_call_notification): Obtain the
524 GIL global lock when calling back into Python
526 2005-08-29 John (J5) Palmieri <johnp@redhat.com>
530 * Add Havoc's patch that never got applied to HEAD (Bug #2436):
532 * bus/policy.c (bus_policy_allow_user): change default "user is
533 allowed" to be "user has same uid as the bus itself"; any
534 allow/deny rules will override.
536 * bus/session.conf.in: don't allow all users, since now by default
537 the user that ran the bus can connect.
539 2005-08-26 Colin Walters <walters@verbum.org>
541 * tools/dbus-print-message.c (print_message): Flush stdout
542 after printing a message, so that redirecting to a file, then
543 hitting Ctrl-C works.
545 2005-08-25 John (J5) Palmieri <johnp@redhat.com>
547 * python/dbus_bindings.pyx: Tracked down a major memleak and fixed it
548 (EmptyMessage): new class that subclasses Message. This is a workaround
549 to a Pyrex bug that fails to call __del__ when the Message object goes out
550 of scope. For some reason subclassing Message fixes this bug
551 (Bus::send_with_reply_and_block): use EmptyMessage instead of Message
552 - s/Message(_create=0)/EmptyMessage everywhere else
554 * test/python/test-{server|client}.py: add the python/.libs directory
555 to the lookup path so dbus_bindings and dbus_glib_bindings don't
556 get picked up from the system
558 2005-08-25 Colin Walters <walters@verbum.org>
560 * glib/dbus-gproxy.c (dbus_g_proxy_call): Doc update, thanks
561 to Ryan Lortie for the suggestion.
563 2005-08-24 John (J5) Palmieri <johnp@redhat.com>
565 * test/python: Add python regression test
567 * configure.in: Add test/python/Makefile
569 * test/Makefile.am: Add the python directory to SUBDIRS
571 2005-08-24 John (J5) Palmieri <johnp@redhat.com>
576 (Interface::connect_to_signal): propigate keywords for match on args
577 (Bus::add_signal_receiver): Fix typo s/dbus_inteface/dbus_interface
579 * python/proxies.py (ProxyObject::connect_to_signal):
580 propigate keywords for match on args
582 * Makefile.am: point everything to pyexecdir since python borks
585 2005-08-23 John (J5) Palmieri <johnp@redhat.com>
589 2005-08-23 Colin Walters <walters@verbum.org>
591 * test/glib/Makefile.am: Don't multiply-define EXTRA_DIST.
593 2005-08-23 John (J5) Palmieri <johnp@redhat.com>
595 * python/dbus_glib_bindings.pyx: reorder imports and c definitions
596 to fix some wranings. We now use dbus_bindings.DBusConnection instead
597 of defining DBusConnection ourselves.
599 2005-08-18 John (J5) Palmieri <johnp@redhat.com>
601 * python/dbus.pth: New path file to fix up problems when installing
602 c libraries to lib64 and python files to lib.
604 * python/Makefile.am: install dbus.pth in the correct spot
606 2005-08-17 John (J5) Palmieri <johnp@redhat.com>
607 * ChangeLog: clean up my last entry a bit
609 * doc/introspect.xsl: New stylesheet for converting introspection data
610 into browser renderable xhtml. Contributed by Lennart Poettering.
612 * doc/introspect.dtd: Fixups in the introspect format from Lennart
615 * doc/dbus-tutorial.xml:
616 - Add Colin Walter to the Authors section for authoring the GLib
618 - Add descriptions of the new signature and type functionality
619 in the Python complex type mapping section
620 - Add a sidenote on the new args matching functionality in
622 - Fixed up some of the examples to use the gobject.MainLoop
626 (Bus::_create_args_dict): New. Converts a hash of arg matches
627 to a more useable format
628 (Bus::add_signal_receiver): add a **keywords parameter for catching
630 (Bus::remove_signal_receiver): add a **keywords parameter for catching
633 * python/matchrules.py:
634 (MatchTree::exec_matches): Check for arg matches
635 (SignalMatchRule::add_args_match): New method
636 (SignalMatchRule::execute): Added args_list parameter as an optimization
637 so we don't have to marshal the args more than once
638 (SignalMatchRule::match_args_from_list): New method that checks to see
639 if the rule's arg matches match an argument list. Only arguments
640 set in the rule are checked.
641 (SignalMatchRule::match_args_from_rule): New method that checks to see
642 if the rule's arg matches match another rule's. All args have to match
643 in order for this method to return true. If either rule has more args
644 then it is not a match.
645 (SignalMatchRule::is_match): Add args match
646 (SignalMatchRule::repr): Add args to the final output if they exist
648 2005-08-17 Ross Burton <ross@burtonini.com>
650 * glib/dbus-gproxy.c:
651 (dbus_g_proxy_call_no_reply): unref the message once sent.
652 (dbus_g_proxy_call): protect against NULL proxy.
654 2005-08-16 John (J5) Palmieri <johnp@redhat.com>
656 * python/__init__.py: Version updated (0, 43, 0)
658 * python/dbus_bindings.pyx:
659 - Fixed type objects to have self passed into __init__
660 - Added the Variant type
661 - Add the ability to specify types or signatures for Array, Variant
663 (Connection::send_with_reply_handlers): return a PendingCall object
664 (_pending_call_notification): handle the case when an error is returned
665 without an error message in the body
666 (MessageIter::get_boolean): return True or False instead of an integer
667 (MessageIter::python_value_to_dbus_sig): add direct checking of types
668 and add checks for objects with embeded signatures or types (Array,
669 Variant and Dictionary)
670 (MessageIter::append_byte): handle case when the value is a dbus.Byte
671 (MessageIter::append_dict): handle embeded types or signatures
672 (MessageIter::append_array): handle embeded types or signatures
673 (MessageIter::append_variant): new method
676 (DeferedMethod): New. Dummy executable object used when queuing calls
677 blocking on introspection data
678 (ProxyMethod::__call__): add the timeout keyword for specifying longer
679 or shorter timeouts for method calls
680 (ProxyObject): Add first pass at an introspection state machine
681 (ProxyObject::__init__): Add introspect keyword for turing off an on
683 (ProxyObject::_Introspect): Internal Introspect call that bypasses
684 the usual mechanisms for sending messages. This is to avoid a deadlock
685 where the Intospect call would be queued waiting for the Introspect
687 (ProxyObject::_introspect_reply_handler): New. This method is called
688 when introspection returns with no error
689 (ProxyObject::_introspect_error_handler): New. This method is called
690 when introspection encounters an error
691 (ProxyObject::__getattr__): Code to handle different introspection
692 states. Queue async calls or block blocking calls if we are
693 introspecting. Pass through as normal if we are not or are done with
696 * python/service.py: Import signal and method from decorators.py
698 * python/types.py: Add Variant type
700 2005-08-16 Colin Walters <walters@verbum.org>
702 * glib/dbus-gobject.c (dbus_set_g_error): Don't lose if the
703 DBusError message is NULL.
705 2005-08-09 Havoc Pennington <hp@redhat.com>
707 * dbus/dbus-errors.c: apply patch from Timo Teras to make a
708 malloc'd copy of the name parameter
710 2005-08-09 Havoc Pennington <hp@redhat.com>
712 * dbus/dbus-message.c (dbus_message_set_reply_serial): print
713 warning if the reply serial is set to 0
715 2005-08-04 Colin Walters <walters@verbum.org>
717 * glib/dbus-gvalue-utils.h (_dbus_g_type_specialized_builtins_init)
718 (dbus_g_type_is_fixed, dbus_g_type_fixed_get_size)
719 (dbus_gvalue_set_from_pointer, dbus_g_hash_table_value_foreach)
720 (dbus_g_hash_table_insert_values, dbus_g_hash_table_insert_steal_values)
721 (dbus_gtype_is_valid_hash_key, dbus_gtype_is_valid_hash_value)
722 (dbus_g_hash_func_from_gtype, dbus_g_hash_free_from_gtype)
723 (dbus_g_hash_equal_from_gtype, dbus_gvalue_stor, dbus_gvalue_take):
724 * glib/dbus-gvalue.h (dbus_g_value_types_init)
725 (dbus_gvalue_demarshal, dbus_gvalue_demarshal_variant)
726 (dbus_gvalue_demarshal_message, dbus_gvalue_marshal):
728 Prefix name with _ to ensure they're not exported. All callers
731 * glib/dbus-gvalue.c (typecode_to_gtype)
732 (dbus_typecode_maps_to_basic, basic_typecode_to_gtype)
733 (signature_iter_to_g_type_dict)
734 (signature_iter_to_g_type_array)
735 (dbus_gtype_from_signature_iter, dbus_gtype_from_signature)
736 (dbus_gtypes_from_arg_signature):
737 Move to dbus-gsignature.c.
739 * glib/dbus-binding-tool-glib.c (dbus_binding_tool_output_glib_server): Call
740 dbus_g_type_specialized_builtins_init instead of dbus_g_value_types_init.
741 (dbus_binding_tool_output_glib_client): Ditto.
743 * glib/Makefile.am (DBUS_GLIB_INTERNALS): Add dbus-gsignature.c
744 and dbus-gsignature.h
746 * test/glib/test-service-glib.c (my_object_rec_arrays): Delete
749 2005-08-03 Colin Walters <walters@verbum.org>
751 * glib/dbus-gobject.c: Add tests on hardcoded object info; this should
752 catch any incompatible changes accidentally made.
754 2005-08-03 Havoc Pennington <hp@redhat.com>
756 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): fix
757 typo, from Julien Puydt
759 * bus/connection.c (bus_connection_disconnected): we were always
760 doing a wait_for_memory due to a buggy loop, found by Timo Hoenig
762 2005-08-01 Colin Walters <walters@verbum.org>
764 Patch from Joe Markus Clarke:
766 * glib/dbus-gidl.c (property_info_unref, arg_info_unref): Fix
769 2005-08-01 Colin Walters <walters@verbum.org>
771 Patch from Joe Markus Clarke:
773 * tools/dbus-send.c (main):
775 Don't use C99 style initializers (bug #3933).
777 2005-08-01 Colin Walters <walters@verbum.org>
779 Patch from Joe Markus Clarke:
781 * glib/dbus-gvalue.c (dbus_g_value_types_init):
782 * glib/dbus-gvalue-utils.c (dbus_g_type_specialized_builtins_init)
783 * glib/dbus-gobject.c (write_interface):
785 Don't use C99 style initializers (bug #3933).
787 2005-07-31 Havoc Pennington <hp@redhat.com>
789 * tools/dbus-viewer.c (load_child_nodes): fix invocation of
790 dbus_g_proxy_call, fix from Piotr Zielinski bug #3920
792 2005-07-30 Havoc Pennington <hp@redhat.com>
794 * fix a bunch of Doxygen warnings and mistakes
796 2005-07-30 Havoc Pennington <hp@redhat.com>
798 * dbus/dbus-sysdeps.c (_dbus_string_parse_uint): remove #ifdef
799 DBUS_BUILD_TESTS since it's now used in production code
801 2005-07-29 Havoc Pennington <hp@redhat.com>
803 * test/glib/test-profile.c (write_junk): initialize the junk
804 buffer so valgrind doesn't have a breakdown
806 2005-07-29 Havoc Pennington <hp@redhat.com>
808 * bus/signals.c (bus_signals_test): add match_rule_equal() tests
809 (match_rule_matches): remove unused arg
810 (test_matching): add tests for match_rule_matches()
812 * bus/signals.c (bus_match_rule_parse_arg_match): add ability to
813 do arg0='foo' arg5='bar' in the match rules
814 (match_rule_matches): don't match if the arg0='foo' doesn't match.
816 * dbus/dbus-protocol.h (DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER): add this
818 2005-07-29 Ross Burton <ross@openedhand.com>
820 * dbus/dbus-connection.c:
821 Don't create a DBusCondVar which is never used.
823 2005-07-27 Ross Burton <ross@openedhand.com>
825 * dbus/dbus-message.c:
826 Reduce the size of the maximum cached message to 10K.
828 2005-07-25 Ross Burton <ross@openedhand.com>
830 * glib/dbus-gproxy.c:
831 Remove matches when all proxies are unregistered.
833 2005-07-24 Colin Walters <walters@verbum.org>
835 * glib/dbus-gvalue.c (signature_iter_to_g_type_array): Don't require
836 typedata; recursive arrays won't have it.
838 * test/glib/test-dbus-glib.c:
839 * test/glib/test-service-glib.c:
840 * test/glib/test-service-glib.xml: Add recursive arrays tests.
842 2005-07-20 John (J5) Palmieir <johnp@redhat.com>
844 * python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py.
845 proxies.py, service.py: Cleanup of code after running it through the
846 pyflakes code checker mostly dealing with undefined names.
847 (Bug #3828, Patch from Anthony Baxter <anthony@interlink.com.au>)
849 2005-07-17 John (J5) Palmieri <johnp@redhat.com>
851 * NEWS: Update to 0.35.2
853 2005-07-17 John (J5) Palmieri <johnp@redhat.com>
855 * python/_dbus.py: Remove import of the dbus.services
856 module as it no longer exists (patch from Dimitur Kirov)
858 * python/service.py (Object::__init__): Fixed typo
859 s/name/bus_name (patch from Dimitur Kirov)
861 * python/examples/example-signal-emitter.py: import dbus.glib
862 to get the main loop and use glib mainloop instead of gtk so
863 X doesn't have to be running.
865 * python/examples/example-signal-recipient.py: import dbus.glib
866 to get the main loop and use glib mainloop instead of gtk so
867 X doesn't have to be running. Import the decorators module
870 * test/glib/Makefile.am: Added DIST_EXTRA files that distcheck
871 didn't pick up on but are needed to build
873 * configure.in: upped version to 0.35.2
875 * bus/driver.c, bus/selinux.c, bus/selinux.h, dbus/dbus-protocol.h:
876 added Colin Walters' SELinux API rename patch from head
877 s/unix sercurity context/selinux security context/
879 2005-07-16 John (J5) Palmieri <johnp@redhat.com>
881 * python/Makefile.am: dbus_binding.pxd.in should be included
882 in EXTRA_DIST not dbus_binding.pxd
883 fix up $(srcdir) hopefully for the last time
885 * NEWS: Update to 0.35.1
887 2005-07-16 Colin Walters <walters@verbum.org>
889 * bus/driver.c (bus_driver_handle_get_connection_selinux_security_context): Renamed
890 from bus_driver_handle_get_connection_unix_security_context. Update for
892 (message_handlers): Update for renames.
894 * bus/selinux.c (bus_selinux_allows_send): Handle OOM on
895 _dbus_string_init failure correctly.
896 (bus_selinux_append_context): Convert SID to context. Append it
898 (bus_selinux_shutdown): Handle the case where bus_selinux_full_init
901 * bus/selinux.h: Update prototype.
903 * dbus/dbus-protocol.h (DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN): Renamed
904 from DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN.
906 2005-07-15 Colin Walters <walters@verbum.org>
908 * doc/TODO: Add note about convenience wrappers.
910 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
912 * NEWS: Update to 0.35
914 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
916 * glib/Makefile.am: Add make-dbus-glib-error-switch.sh to EXTRA_DIST
917 so distcheck doesn't fail
919 * glib/examples/Makefile.am: Add example-service.xml and
920 example-signal-emitter.xml to EXTRA_DIST so distcheck doesn't fail
922 * glib/examples/statemachine/Makefile.am: Add statemachine.xml and
923 statemachine-server.xml to EXTRA_DIST so distcheck doesn't fail
925 * python/Makefile.am: Preprend $(srcdir)/ to source files so the
926 compiler looks in the right places during distcheck
928 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
930 * glib/example/Makefile.am: Fix a typo which cause make distcheck
933 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
935 * python/examples/example-service.py,
936 python/examples/example-signal-emitter.py: Fixed up examples
939 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
941 * python/__init__.py: Upped to version (0,42,0) because of
944 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
946 * ChangeLog: fix date in last entry
948 * configure.in, bus/system.conf.in: add the ability to configure
949 the system bus user at compiletime with the --with-dbus-user flag
950 (patch from Kristof Vansant)
952 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
954 * bus/dispatch.c, test/test-service.c: Add testcase
955 for sending messages to oneself (TODO item).
957 * python/service.py (class Object): Swap ordering of bus_name
958 and object_path parameters to better support inheritance.
960 * doc/dbus-tutorial.xml: change Python docs to reflect change
961 in parameter ordering and fix the inheritance section.
963 * doc/TODO: remove sending message to oneself TODO item
965 2005-07-15 Ross Burton <ross@openedhand.com>
967 * glib/dbus-gproxy.c:
968 Fix a leak when calling methods via the proxy.
970 2005-07-15 Colin Walters <walters@verbum.org>
972 * bus/selinux.c (bus_selinux_append_context): Wrap in
975 2005-07-14 John (J5) Palmieri <johnp@redhat.com>
977 * python/_dbus.py (Bus::remove_signal_receiver):
978 don't add a callback to the match if none has been passed in
980 * python/matchrules.py (SignalMatchTree::remove): if the rule
981 being matched does not have a callback treat it as a wildcard
984 * doc/dbus-tutorial.xml: Add Python tutorial
986 2005-07-14 Colin Walters <walters@verbum.org>
989 (bus_driver_handle_get_connection_unix_security_context): New function.
990 (message_handlers): Add.
992 * bus/selinux.c (bus_selinux_append_context): New function; appends
993 security context to message.
995 * bus/selinux.h: Prototype.
997 * dbus/dbus-protocol.h (DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN): New.
999 2005-07-14 John (J5) Palmieri <johnp@redhat.com>
1001 * bus/activation.c: clean up all tabs to be 8 spaces
1002 (bus_activation_activate_service): make sure we clean up
1005 * bus/dispatch.c: clean up all tabs to be 8 spaces
1006 (check_shell_fail_service_auto_start): New function
1007 tests to make sure we get fail properly when trying to auto start a service
1008 with a faulty command line
1009 (check_shell_service_success_auto_start): New function tests to make sure
1010 auto started services get the arguments on the command line
1012 * test/test-shell-service.c: Added service for testing auto-starting with
1013 command line arguments
1015 * test/data/valid-service-files/debug-shell-echo-fail.service.in,
1016 test/data/valid-service-files/debug-shell-echo-success.service.in:
1017 Added service files for testing auto-starting with command line arguments
1019 * */.cvsignore: added a bunch of generated files to various .cvsignore files
1021 2005-07-14 Rodrigo Moya <rodrigo@novell.com>
1023 * dbus/dbus-shell.[ch]: copy/pasted code from GLib.
1025 * dbus/Makefile.am: added new files to build.
1027 * bus/activation.c (bus_activation_activate_service): support
1028 activation commands with parameters.
1030 * test/shell-test.c: added test program for the shell parsing
1033 2005-07-13 David Zeuthen <davidz@redhat.com>
1035 * tools/dbus-send.c (append_arg, type_from_name): Also support 16 and
1036 64 bit signed and unsigned parameters
1038 2005-07-13 John (J5) Palmieri <johnp@redhat.com>
1040 * python/.cvsignore: remove dbus_bindings.pyx, add dbus_bindings.pxd
1042 * python/service.py (class Name): renamed BusName to make it clearer
1043 what the object is for (a name on the bus)
1045 * python/examples/example-service.py,
1046 python/examples/example-signal-emitter.py: change the Name object to
1049 2005-07-12 Colin Walters <walters@verbum.org>
1051 Patch from Jim Gettys <Jim.Gettys@hp.com>.
1053 * tools/dbus-launch.c: Include sys/select.h.
1055 2005-07-12 John (J5) Palmieri <johnp@redhat.com>
1056 * python/dbus_bindings.pyx.in: removed
1058 * python/dbus_bindings.pyx: Added.
1059 - Fixed some memleaks (patch from
1060 Sean Meiners <sean.meiners@linspireinc.com>)
1061 - Broke out the #include "dbus_h_wrapper.h" and put it in its
1062 own pxd file (Pyrex definition)
1063 - Broke out glib dependancies into its own pyx module
1065 * python/dbus_bindings.pdx: Added.
1066 - Defines C class Connection for exporting to other modules
1068 * python/dbus_glib_bindings.pyx: Added.
1069 - New module to handle lowlevel dbus-glib mainloop integration
1071 * python/glib.py: Added.
1072 - Registers the glib mainloop when you import this module
1074 * python/services.py: Removed (renamed to service.py)
1076 * python/service.py: Added.
1077 - (class Server): renamed Name
1079 * python/__init__.py: Bump ro version (0,41,0)
1080 -don't import the decorators or service module
1081 by default. These now reside in the dbus.service namespace
1083 * python/_dbus.py (Bus::__init__): Add code run the main loop
1084 setup function on creation
1086 * python/examples/example-service.py,
1087 python/examples/example-signal-emitter.py: update examples
1089 * python/examples/gconf-proxy-service.py,
1090 python/examples/gconf-proxy-service2.py: TODO fix these up
1092 * doc/TODO: Addition
1093 - Added a Python Bindings 1.0 section
1094 - added "Add match on args or match on details to match rules"
1097 2005-07-12 Colin Walters <walters@verbum.org>
1099 * glib/examples/statemachine/Makefile.am (statemachine-server-glue.h)
1100 (statemachine-glue.h):
1101 * glib/examples/Makefile.am (example-service-glue.h)
1102 (example-signal-emitter-glue.h):
1103 * glib/Makefile.am (dbus-glib-error-switch.h):
1104 Add libtool --mode=execute so we use the built library instead
1105 of any installed one.
1107 2005-07-11 Colin Walters <walters@verbum.org>
1109 * glib/dbus-gvalue.c (struct _DBusGValue): Delete.
1110 (dbus_g_value_types_init): Remove assertion.
1111 (dbus_g_value_get_g_type, dbus_g_value_open)
1112 (dbus_g_value_iterator_get_values, dbus_g_value_get_signature)
1113 (dbus_g_value_copy, dbus_g_value_free): Delete unimplemented
1114 functions related to DBusGValue. Now we marshal/demarshal
1115 structures as GValueArray.
1116 (dbus_gtype_from_signature_iter): Return G_TYPE_VALUE_ARRAY for
1118 (signature_iter_to_g_type_array): Don't call
1119 signature_iter_to_g_type_struct.
1120 (signature_iter_to_g_type_struct): Delete.
1121 (dbus_gvalue_to_signature): Delete.
1122 (dbus_gvalue_to_signature): New function with same name as other
1123 one; we can convert structures to signatures.
1124 (demarshal_valuearray): New function.
1125 (get_type_demarshaller): Use it.
1126 (demarshal_recurse): Delete.
1127 (marshal_proxy): New function.
1128 (marshal_map): Warn if we can't determine signature from type.
1129 (marshal_collection_ptrarray): Ditto.
1130 (marshal_collection_array): Ditto.
1131 (get_type_marshaller): Use marshal_valuearray.
1132 (marshal_recurse): Delete.
1133 (_dbus_gvalue_test): Add some tests.
1135 * dbus/dbus-glib.h (struct _DBusGValueIterator):
1136 (dbus_g_value_get_g_type, DBUS_TYPE_G_VALUE)
1137 (dbus_g_value_open, dbus_g_value_iterator_get_value)
1138 (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
1139 (dbus_g_value_free): Remove prototypes.
1141 * glib/dbus-binding-tool-glib.c (dbus_g_type_get_lookup_function): Handle
1144 * glib/examples/example-service.c:
1145 * glib/examples/example-client.c: Implement GetTuple.
1147 * test/glib/test-dbus-glib.c:
1148 * test/glib/test-service-glib.c:
1149 * test/glib/test-service-glib.xml: Add structure tests.
1151 2005-07-10 Colin Walters <walters@verbum.org>
1153 * doc/TODO: Knock off some GLib items with this patch.
1155 * glib/dbus-gvalue-utils.c (_dbus_gtype_can_signal_error)
1156 (_dbus_gvalue_signals_error): New functions.
1158 * glib/dbus-gvalue-utils.h: Prototype them.
1160 * glib/dbus-gobject.c (arg_iterate): Update to handle return vals
1161 and change to not output const/retval flags for input args. All
1163 (invoke_object_method): Refactor to handle return values. Add
1164 some more comments in various places. Remove debug g_print.
1166 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_RETURNVAL): New.
1168 * glib/dbus-binding-tool-glib.c (dbus_g_type_get_marshal_name):
1170 (compute_gsignature): New function; refactored from code from
1171 compute_marshaller and compute_marshaller_name. Enhance to
1172 handle return values and async ops more cleanly. Update for
1173 async ops returning NONE instead of BOOLEAN.
1174 (compute_marshaller, compute_marshaller_name): Call compute_gsignature
1175 and output appropriate string.
1176 (generate_glue): Handle return value annotation. Also don't dump
1177 constness flag for input arguments.
1179 * glib/Makefile.am (DBUS_GLIB_INTERNALS): New variable; contains
1180 files shared between installed library and utilities.
1181 (libdbus_glib_1_la_SOURCES): Move some stuf into DBUS_GLIB_INTERNALS.
1182 (libdbus_gtool_la_SOURCES): Suck in DBUS_GLIB_INTERNALS so the
1183 binding tool can access gtype utility functions.
1185 * test/glib/test-service-glib.c:
1186 * test/glib/test-service-glib.xml:
1187 * test/glib/test-dbus-glib.c: Add some tests for return values.
1189 2005-07-09 Colin Walters <walters@verbum.org>
1191 * glib/dbus-gparser.c (parse_annotation): Add annotations to
1192 argument if available, not method.
1194 * glib/dbus-gobject.c (arg_iterate): More verbose warnings.
1195 (invoke_object_method): First, remove some redundant
1196 GValues (object_value, error_value) in favor of working on
1197 array directly. Second, rework constness to be less buggy.
1198 Now we iterate directly over the argument metadata instead
1199 of parallel iterating over output signature and metadata.
1201 * glib/dbus-glib-tool.h: Add INVALID_ANNOTATION error.
1203 * glib/dbus-binding-tool-glib.c (generate_glue): Barf on const
1204 annotation on input args.
1206 2005-07-09 Colin Walters <walters@verbum.org>
1208 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_CONST):
1211 * glib/dbus-binding-tool-glib.c (generate_glue): Handle Const
1214 * glib/dbus-gobject.c (arg_iterate): Update to parse constval too.
1215 (method_dir_signature_from_object_info): Handle arg_iterate change.
1216 (write_interface): Ditto.
1217 (lookup_object_info): Don't barf if format_version is > 0.
1218 (invoke_object_method): Handle arg constness.
1220 * glib/dbus-gidl.c (struct ArgInfo): Add annotations.
1221 (arg_info_new): Create.
1222 (arg_info_unref): Destroy.
1223 (arg_info_get_annotations, arg_info_get_annotation)
1224 (arg_info_add_annotation): New functions.
1226 * glib/dbus-gidl.h: Prototype them.
1228 * glib/dbus-gparser.c (parse_annotation): Allow annotations in
1229 args, disallow them in properties.
1230 (parse_annotation): Handle arg annotations.
1232 * test/glib/test-service-glib.xml:
1233 * test/glib/test-service-glib.c: Update to make some methods
1236 2005-07-08 Colin Walters <walters@verbum.org>
1238 * test/glib/test-service-glib.xml:
1239 * test/glib/test-service-glib.c:
1240 * test/glib/test-dbus-glib.c: Test a{sv}.
1242 * glib/examples/statemachine/statemachine.c:
1243 * glib/examples/statemachine/statemachine-server.c:
1244 * glib/examples/statemachine/statemachine-client.c: Fix some bugs,
1245 add progress bar, etc.
1247 * glib/dbus-gvalue.c (register_array, register_dict): Delete; not
1248 needed anymore due to generic array/map marshalling.
1249 (dbus_g_value_types_init): Don't register basic arrays or the
1251 (dbus_gtype_from_signature_iter): Don't try to recurse into
1253 (dbus_gtype_to_signature): Check collection/map before type
1255 (demarshal_garray_basic): Renamed to demarshal_collection_array.
1256 (demarshal_ghashtable): Renamed to demarshal_map; fix to use new
1257 generic map creation/append functions instead of hash table
1259 (get_type_demarshaller): Handle maps.
1260 (demarshal_collection): Dispatch on collection type to either
1261 demarshal_collection_ptrarray or demarshal_collection_array.
1262 (get_type_marshaller): Handle maps.
1263 (marshal_collection): Dispatch collection type to either
1264 marshal_collection_ptrarray or marshal_collection_array.
1265 (_dbus_gvalue_test): New test.
1267 * glib/dbus-gvalue-utils.c (unset_and_free_g_value): New function.
1268 (hash_free_from_gtype): Use it to free GValues.
1269 (hashtable_append): New function.
1270 (ptrarray_append): Fix prototype.
1271 (slist_append): Ditto.
1272 (_dbus_gvalue_utils_test): Extend tests.
1274 * glib/dbus-gtype-specialized.c
1275 (dbus_g_type_specialized_init_append): Renamed from
1276 dbus_g_type_specialized_collection_init_append. Remove const from
1277 value, since we steal it.
1278 (dbus_g_type_specialized_map_append): New function.
1280 * glib/dbus-gtype-specialized.h: Update prototypes.
1281 Add DBusGTypeSpecializedMapAppendFunc.
1283 * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
1286 * glib/dbus-gtest.h: Prototype it.
1288 2005-07-08 Ross Burton <ross@openedhand.com>
1291 Add DBysGAsyncData for the async bindings.
1293 * glib/dbus-binding-tool-glib.c:
1294 Re-enable the async bindings.
1296 * test/glib/test-dbus-glib.c:
1297 Add a test for the generated async bindings.
1299 2005-07-08 Colin Walters <walters@verbum.org>
1301 * doc/TODO: Update GLib todo bits, also add a post-1.0 TODO for a
1304 2005-07-08 Colin Walters <walters@verbum.org>
1306 * tools/Makefile.am: Kill of print-introspect in favor of using
1307 dbus-send --print-reply=literal.
1309 * test/glib/test-service-glib.xml:
1310 * test/glib/test-service-glib.c (my_object_get_objs): New test
1313 * test/glib/test-dbus-glib.c (echo_received_cb): Free echo data.
1314 (main): Test GetObjs.
1316 * glib/examples/statemachine/Makefile.am:
1317 * glib/examples/statemachine/sm-marshal.list:
1318 * glib/examples/statemachine/statemachine-client.c:
1319 * glib/examples/statemachine/statemachine-server.c:
1320 * glib/examples/statemachine/statemachine-server.xml:
1321 * glib/examples/statemachine/statemachine.c:
1322 * glib/examples/statemachine/statemachine.h:
1323 * glib/examples/statemachine/statemachine.xml:
1327 * glib/examples/example-service.c (main): Move invocation
1328 of dbus_g_object_type_install_info earlier, to emphasize it
1329 should only be done once.
1331 * glib/examples/example-signal-emitter.c (main): Ditto.
1333 * glib/examples/Makefile.am (SUBDIRS): Include statemachine.
1335 * glib/dbus-gvalue.h (dbus_gtype_to_signature)
1336 (dbus_gvalue_marshal): Update prototypes.
1338 * glib/dbus-gvalue.c: Update all marshalling functions to take
1339 const GValue instead of GValue.
1340 (signature_iter_to_g_type_array): Return a GPtrArray for nonfixed
1342 (dbus_gvalue_to_signature): Update for dbus_gtype_to_signature
1344 (dbus_gtype_to_signature): Handle generic collecitons and maps.
1345 Return a newly-allocated string.
1346 (demarshal_proxy, demarshal_object_path, demarshal_object)
1347 (demarshal_strv, demarshal_ghashtable): Set error, don't assert if
1348 we get the wrong types from message.
1349 (get_type_demarshaller): New function, extracted from
1350 dbus_gvalue_demarshal.
1351 (demarshal_collection): New function, demarshals generic
1353 (dbus_gvalue_demarshal): Just invoke result of
1354 get_type_demarshaller. Throw error if we don't have one.
1355 (marshal_garray_basic): Abort on OOM.
1356 (get_type_marshaller): New function, extracted from
1357 dbus_gvalue_marshal.
1358 (collection_marshal_iterator, marshal_collection): New functions;
1359 implements generic marshalling for an iteratable specialized
1361 (dbus_gvalue_marshal): Just invoke result of get_type_marshaller.
1363 * glib/dbus-gvalue-utils.c (gvalue_from_ptrarray_value): Handle
1365 (ptrarray_value_from_gvalue): Ditto.
1366 (ptrarray_append, ptrarray_free): New functions.
1367 (slist_constructor, slist_iterator, slist_copy_elt, slist_copy)
1368 (slist_append, slist_end_append, slist_free): New functions.
1369 (dbus_g_type_specialized_builtins_init): Add append fuctions
1370 for GPtrArray and GSList. Register GSList.
1371 (test_specialized_hash, _dbus_gvalue_utils_test): New functions.
1373 * glib/dbus-gtype-specialized.h (DBusGTypeSpecializedAppendContext):
1375 (dbus_g_type_specialized_collection_init_append)
1376 (dbus_g_type_specialized_collection_append)
1377 (dbus_g_type_specialized_collection_end_append): Prototype.
1378 (DBusGTypeSpecializedCollectionVtable): Add append_func and
1381 * glib/dbus-gtype-specialized.c (dbus_g_type_specialized_collection_init_append)
1382 (dbus_g_type_specialized_collection_append)
1383 (dbus_g_type_specialized_collection_end_append): New functions.
1384 (dbus_g_type_map_value_iterate): Take const GValue.
1385 (dbus_g_type_collection_value_iterate): Ditto.
1387 * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
1388 _dbus_gvalue_utils_test.
1390 * glib/dbus-gtest.h: Prototype it.
1392 * glib/dbus-gproxy.c (dbus_g_proxy_manager_filter): Avoid
1393 using uninitialized owner_list.
1394 (dbus_g_proxy_begin_call_internal): Move return_if_fail to
1396 (dbus_g_proxy_end_call_internal): Update to use error set
1397 from dbus_gvalue_demarshal instead of setting it here.
1398 (dbus_g_proxy_begin_call): Move return_if_fail here.
1400 * glib/dbus-gobject.c (write_interface): Update for
1401 dbus_gtype_to_signature returning new string.
1403 * configure.in: Add glib/examples/statemachine.
1405 2005-07-08 Joe Shaw <joeshaw@novell.com>
1407 * configure.in: Add a configure option, --with-console-auth-dir
1409 * dbus/dbus-sysdeps-util.c (_dbus_user_at_console): Use the
1410 new setting. Patch from Kay Sievers.
1412 2005-07-06 Colin Walters <walters@verbum.org>
1414 * dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
1415 (DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
1416 (dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
1417 (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
1418 Delete in favor of dbus_g_proxy_begin_call and
1419 dbus_g_proxy_cancel_call.
1420 (DBusGProxyCall, DBusGProxyCallNotify): New.
1421 (dbus_g_proxy_begin_call): Change prototype to take callback, user
1422 data, and destroy function. This replaces
1423 dbus_g_pending_call_set_notify.
1424 (dbus_g_proxy_cancel_call): Prototype.
1425 (DBusGAsyncData): Delete, shouldn't be needed anymore.
1427 * glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
1429 (struct _DBusGProxyManager): Add bus_proxy member, which is an
1430 internal proxy for calls to the bus. Remove
1431 pending_nameowner_calls, now the internal proxy keeps track.
1432 (dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
1433 pending_nameowner_calls.
1434 (got_name_owner_cb): Update prototype, and use
1435 dbus_g_proxy_end_call.
1436 (got_name_owner_cb): Remove reference to pending_nameowner_calls.
1437 (dbus_g_proxy_manager_register): Delete directly libdbus code in
1438 favor of using internal proxy.
1439 (dbus_g_proxy_manager_unregister): Update to use
1440 dbus_g_proxy_cancel_call for any pending GetNameOwner call.
1441 (dbus_g_proxy_init): Initialize pending calls map.
1442 (dbus_g_proxy_constructor): New.
1443 (dbus_g_proxy_class_init): Add get/set property functions,
1444 constructor, and add NAME, PATH, and INTERFACE properties.
1445 (cancel_pending_call): New function.
1446 (dbus_g_proxy_dispose): Iterate over any outstanding calls and
1448 (dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
1449 (GPendingNotifyClosure): New structure.
1450 (d_pending_call_notify, d_pending_call_free): Moved here from
1452 (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
1454 (manager_begin_bus_call): New internal function for talking to
1456 (dbus_g_proxy_new): Construct object using GObjet properties.
1457 (dbus_g_proxy_begin_call_internal): Update to take user data, etc.
1458 Create closure of same, and insert call into map of pending calls.
1459 (dbus_g_proxy_end_call_internal): Take call id instead of pending
1460 call. Look up pending call in current set. Remove it when we've
1462 (dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
1463 (dbus_g_proxy_begin_call): Change API to take callback, user data,
1464 and destroy function directly.
1465 (dbus_g_proxy_end_call): Update to take DBusGProxyCall.
1466 (dbus_g_proxy_call): Invoke with NULL callback.
1467 (dbus_g_proxy_cancel_call): New function, replaces
1468 dbus_g_pending_call_cancel.
1470 * glib/dbus-gparser.c (validate_signature): Fix call to
1473 * glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
1474 New quark for attaching metadata to GType.
1475 (info_hash): Delete.
1476 (lookup_object_info): Look up using quark.
1477 (dbus_g_object_type_install_info): Check that a type is classed,
1478 not that it's an object. Also just install type data using quark
1479 instead of using global hash.
1481 * glib/dbus-glib.c (dbus_g_pending_call_ref)
1482 (dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
1483 (GPendingNotifyClosure): Delete.
1484 (d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
1485 (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
1487 * glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
1488 client method generation until we can fix it...
1490 * tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
1491 (load_from_service_thread_func): Ditto.
1493 * tools/dbus-names-model.c (struct NamesModel): Hold
1495 (have_names_notify): Update prototype, use
1496 dbus_g_proxy_cancel_call.
1497 (names_model_reload): Update for new dbus_g_proxy_begin_call API.
1499 * tools/dbus-monitor.c (filter_func): Update for print_message
1502 * test/glib/test-dbus-glib.c: Add more tests for async
1503 invocations. Update many begin_call/end_call pairs to just use
1506 * tools/dbus-send.c (main): Add --print-reply=literal mode. This
1507 allows us to dump print-introspect.c.
1509 * tools/dbus-print-message.h (print_message): Add literal argument
1510 to print_message which is intended to allow printing arguments without
1511 metadata like "string=".
1513 * tools/dbus-print-message.c (print_iter): Add literal argument.
1514 (print_message): Allow printing string messages literally.
1516 2005-07-05 Colin Walters <walters@verbum.org>
1518 * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
1519 Remove value refcount leak, original patch from Jorn Baayen
1520 <jorn@openedhand.com>. Also remove useless extra value in favor
1521 of prepending to value array directly.
1523 2005-07-02 Colin Walters <walters@verbum.org>
1525 * glib/dbus-gmain.c (_dbus_gmain_test): Fix test.
1527 2005-07-01 Colin Walters <walters@verbum.org>
1529 Patch from Jonathan Matthew <jonathan@kaolin.hn.org>
1531 * glib/dbus-gvalue.c (basic_typecode_to_gtype): Fix return type.
1532 (dbus_g_value_types_init): Marshal G_TYPE_CHAR as DBUS_TYPE_BYTE,
1533 G_TYPE_LONG as DBUS_TYPE_INT32, G_TYPE_ULONG as DBUS_TYPE_UINT32,
1534 and G_TYPE_FLOAT as DBUS_TYPE_DOUBLE.
1536 2005-06-30 Colin Walters <walters@verbum.org>
1538 * test/glib/test-dbus-glib.c:
1539 * test/glib/test-service-glib.c:
1540 * test/glib/test-service-glib.xml: Update tests for new error
1541 setting bits, also add async tests (patch from Ross Burton).
1543 * test/glib/Makefile.am (test_service_glib_LDADD): Add
1544 DBUS_GLIB_THREADS_LIBS.
1546 * glib/dbus-gproxy.c (get_name_owner)
1547 (dbus_g_pending_call_end_valist): Ditto.
1549 * glib/dbus-gobject.c (error_metadata): New mapping from GError
1550 domain (GQuark) to DBusGErrorInfo.
1551 (gerror_domaincode_to_dbus_error_name): Attempt to look up error
1552 quark in error_metadata. Take message interface as default
1553 error message interface.
1554 (gerror_to_dbus_error_message): Pass message interface.
1555 (dbus_set_g_error): Resurrected.
1556 (dbus_g_error_info_free): New function.
1557 (dbus_g_object_type_install_info): Use g_type_class_ref instead
1558 of _peek to actually create the object class if it hasn't been
1560 (dbus_g_error_domain_register): New function.
1562 * glib/dbus-gmain.c (dbus_g_bus_get): Switch to dbus_set_g_error.
1564 * glib/dbus-gparser.c (validate_signature): Ditto.
1566 * dbus/dbus-glib.h (dbus_g_error_set): Delete.
1567 (dbus_g_error_domain_register): Prototype.
1569 * glib/dbus-glib.c (dbus_g_error_set): Delete.
1572 2005-06-29 Colin Walters <walters@verbum.org>
1574 * dbus/dbus-glib.h: Delete DBUS_TYPE_G_PROXY_ARRAY. Add
1575 DBUS_TYPE_G_OBJECT_PATH.
1577 * glib/dbus-gvalue.c (dbus_g_value_types_init): Remove marshallers
1578 for G_TYPE_OBJECT and DBUS_TYPE_G_PROXY_ARRAY (the latter should
1579 be handled more generically). Add DBUS_TYPE_G_OBJECT_PATH.
1580 (dbus_g_object_path_get_g_type): New function.
1581 (dbus_gtype_from_signature_iter): Map DBUS_TYPE_OBJECT_PATH
1582 to DBUS_TYPE_G_OBJECT_PATH by default.
1583 (demarshal_proxy): Remove unused name variable.
1584 (demarshal_object_path, marshal_object_path): New functions.
1585 (demarshal_proxy_array, marshal_proxy_array): Delete.
1587 * glib/dbus-binding-tool-glib.c (dbus_g_type_get_c_name): Map
1588 DBUS_TYPE_G_OBJECT_PATH to char *.
1589 (dbus_g_type_get_lookup_function): Map builtin
1590 DBUS_TYPE_G_OBJECT_PATH.
1592 * test/glib/test-dbus-glib.c
1593 * test/glib/test-service-glib.c (my_object_objpath):
1594 Adapt tests to new object path marshalling.
1596 2005-06-29 John (J5) Palmieri <johnp@redhat.com>
1598 * configure.in: force check for Python >= 2.4
1600 2005-06-29 Colin Walters <walters@verbum.org>
1602 Patch from Ross Burton <ross@openedhand.com>
1604 * glib/dbus-gobject.c (invoke_object_method): Unset object
1605 value in all cases, not only in async case.
1607 2005-06-29 Colin Walters <walters@verbum.org>
1609 * glib/dbus-gproxy.c (struct _DBusGProxy): Add new member
1610 name_call for keeping track of any outgoing GetNameOwner call.
1611 Also add for_owner and associated.
1612 (struct _DBusGProxyManager): Add owner_names, which is hash table
1613 that maps a base name to a list of names it owns (that we're
1614 interested in). Add pending_nameowner_calls which is a list of
1615 all outstanding GetNameOwner; avoids us having to iterate over
1616 every proxy. Add unassociated_proxies which keeps track of name
1617 proxies with no associated name owner.
1618 (dbus_g_proxy_manager_unref): Destroy owner_names.
1619 (struct DBusGProxyNameOwnerInfo): New struct for keeping track of
1621 (find_name_in_info, name_owner_foreach)
1622 (dbus_g_proxy_manager_lookup_name_owner, insert_nameinfo)
1623 (dbus_g_proxy_manager_monitor_name_owner)
1624 (dbus_g_proxy_manager_unmonitor_name_owner)
1625 (unassociate_proxies, dbus_g_proxy_manager_replace_name_owner):
1626 New functions; they manipulate the owner_names mapping.
1627 (got_name_owner_cb): New function.
1628 (get_name_owner): New function, extracted from
1629 dbus_g_proxy_new_for_name_owner.
1630 (dbus_g_proxy_manager_register): For now we need to keep track of
1631 all NameOwnerChanged. Also if the proxy is for a name, if we
1632 don't already know the name owner, queue a new GetNameOwner
1633 request and add it to our list of unassociated proxies. Otherwise
1635 (dbus_g_proxy_manager_unregister): If this proxy is for a name,
1636 cancel any pending GetNameOwner call, etc.
1637 (dbus_g_proxy_manager_filter): Handle NameOwnerChanged. Also use
1638 the owner_names mapping to look up the current names for the
1639 signal source, and dispatch to any proxies for that name.
1640 (dbus_g_proxy_new): Initialize new members.
1641 (dbus_g_proxy_new_for_name): Delete unused proxy variable.
1642 (dbus_g_proxy_new_for_name_owner): Use get_name_owner.
1643 (dbus_g_pending_call_end_valist): New function, extracted from
1644 dbus_g_proxy_end_call_internal. Useful when we don't have a proxy
1645 but want to use the GLib infrastructure. Also note how many
1646 arguments in reply were over.
1647 (dbus_g_pending_call_end): New function, just call
1648 dbus_g_pending_call_end_valist.
1649 (dbus_g_proxy_end_call_internal): Just call
1650 dbus_g_pending_call_end_valist.
1652 * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Fix lookup
1653 of builtin marshaller for STRING_STRING_STRING.
1655 * test/glib/test-dbus-glib.c:
1656 * test/glib/test-service-glib.c:
1657 * test/glib/test-service-glib.xml:
1658 Extend tests to cover name proxies, destruction of owner proxies,
1661 * glib/examples/example-signal-recipient.c
1662 (dbus_g_proxy_new_for_name_owner): Create a name proxy.
1664 * tools/dbus-send.c (main): Print D-BUS error name in addition
1667 2005-06-28 John (J5) Palmieri <johnp@redhat.com>
1669 * python/dbus_bindings.pyx.in (cunregister_function_handler,
1670 cmessage_function_handler): Patch from
1671 Anthony Baxter <anthony@interlink.com.au> fixes threading problems
1672 by using the Py_GILState_Ensure/Release to synchronize with the
1675 2005-06-28 Ray Strode <rstrode@redhat.com>
1677 * dbus/dbus-spawn.c (_dbus_babysitter_unref): kill
1678 babysitter helper process on last unref, bug #2813.
1680 2005-06-27 Colin Walters <walters@verbum.org>
1682 * test/glib/test-dbus-glib.c:
1683 * test/glib/test-service-glib.c:
1684 * test/glib/test-service-glib.xml:
1685 Test hash table signal emitting.
1687 * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Convert
1688 types to their fundamental basis types, since this is what
1689 marshallers operate on. Also add an entry for VOID__BOXED.
1690 (dbus_g_object_register_marshaller_array): Convert to fundamental.
1692 2005-06-26 Havoc Pennington <hp@redhat.com>
1694 * doc/dbus-tutorial.xml: fix names of interface/service/path, fix
1697 2005-06-26 Colin Walters <walters@verbum.org>
1699 * glib/dbus-glib.c (dbus_set_g_error): Delete.
1700 (dbus_g_error_set): New public function from its ashes; used by
1701 both service-side method implementation and GLib bindings
1703 (dbus_g_error_has_name, dbus_g_error_get_name): New function.
1704 (_dbus_glib_test): Add some tests.
1706 * test/glib/test-dbus-glib.c (main): Test dbus_g_error_has_name.
1708 * test/glib/test-service-glib.c (my_object_throw_error): Use
1711 * glib/dbus-gobject.c (gerror_to_dbus_error_message): Handle
1712 errors thrown by dbus_g_error_set.
1714 * glib/dbus-gmain.c (dbus_g_bus_get): Change to dbus_g_error_set.
1716 * glib/dbus-gparser.c (validate_signature): Ditto.
1718 * glib/dbus-gproxy.c (dbus_g_proxy_new_for_name_owner)
1719 (dbus_g_proxy_end_call_internal): Ditto.
1721 * glib/Makefile.am: Generate dbus-glib-error-switch.h, which
1722 converts DBUS_ERROR_x to DBUS_GERROR_x.
1723 (libdbus_glib_1_la_SOURCES, BUILT_SOURCES, CLEANFILES): Add it.
1725 * doc/TODO: Remove error TODO.
1727 * doc/dbus-tutorial.xml: Update with documentation about error
1730 * dbus/make-dbus-glib-error-enum.sh: Tighten up regexp to make
1731 sure we only change DBUS_ERROR to DBUS_GERROR, not all ERROR to
1732 GERROR. Also add DBUS_GERROR_REMOTE_EXCEPTION.
1734 2005-06-22 Colin Walters <walters@verbum.org>
1736 Patch from Ross Burton <ross@openedhand.com>
1738 * glib/dbus-gobject.c (dbus_g_method_return): Free out_sig.
1740 2005-06-20 Colin Walters <walters@verbum.org>
1742 * configure.in: Add glib/examples.
1744 * glib/Makefile.am: Add examples/
1746 * glib/examples/.cvsignore
1747 * glib/examples/Makefile.am
1748 * glib/examples/example-client.c
1749 * glib/examples/example-service.c
1750 * glib/examples/example-service.xml
1751 * glib/examples/example-signal-emitter.c
1752 * glib/examples/example-signal-emitter.xml
1753 * glib/examples/example-signal-recipient.c:
1754 New files; GLib binding examples, ported from
1757 2005-06-20 Colin Walters <walters@verbum.org>
1760 * glib/dbus-gproxy.c: Rename dbus_g_proxy_invoke to
1763 * glib/dbus-binding-tool-glib.c:
1764 * doc/dbus-tutorial.xml:
1765 * test/glib/test-dbus-glib.c: Update for rename.
1767 2005-06-20 Colin Walters <walters@verbum.org>
1769 Patch suggested by Ross Burton <ross@openedhand.com>
1771 * glib/dbus-gobject.c (export_signals): Free signal name.
1772 (g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
1773 memory leak. Add a bit of documentation.
1774 (dbus_g_method_return_error): Free context, and note we do
1777 2005-06-18 Murray Cumming <murrayc@murrayc.com>
1780 * glib/dbus-gobject.c:
1781 * glib/dbus-gproxy.c:
1782 * glib/dbus-gvalue.c: Predeclare structs as
1783 typedef struct _Something Something instead of
1784 typedef struct Something Something, so we can
1785 redeclare the prototypes. Other GNOME libraries
1788 2005-06-17 Colin Walters <walters@verbum.org>
1790 * tools/dbus-names-model.c (have_names_notify): Fix call
1791 to dbus_g_proxy_end_call.
1793 2005-06-17 Colin Walters <walters@verbum.org>
1795 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
1796 spew warnings if we get malformed remote signals.
1798 * glib/dbus-gobject.c (propsig_iterate): New function.
1799 (lookup_object_info): New function, extracted from
1800 lookup_object_and_method.
1801 (introspect_properties, introspect_signals): Delete; these
1802 are merged into write_interface.
1803 (write_interface): Write out signals and properties here;
1804 dump the org.gtk.object stuff and use the interface given
1805 in the introspection data blob. Also fix up property XML.
1806 (lookup_values): New function.
1807 (introspect_interfaces): Gather a mapping from interface to a
1808 list of its methods, signals, and properties, then write out
1810 (lookup_object_and_method): Use lookup_object_info.
1811 (struct DBusGSignalClosure): Add interface.
1812 (dbus_g_signal_closure_new): Add interface. Don't dup signame;
1813 we can just use the constant data.
1814 (dbus_g_signal_closure_finalize): Don't free signal name.
1815 (signal_emitter_marshaller): Use interface from signal closure.
1816 (export_signals): Only export signals mentioned in introspection
1818 (dbus_g_connection_register_g_object): Warn if we have no
1819 introspection data for an object.
1820 (funcsig_equal): Remove unused variable.
1821 (dbus_g_object_register_marshaller): Take varargs instead of
1823 (dbus_g_object_register_marshaller_array): New function,
1824 extracted from old dbus_g_object_register_marshaller.
1826 * glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
1827 signals and property data.
1828 (write_quoted_string): New function, extracted from generate_glue.
1829 (generate_glue): Write signals and properties to introspection
1832 * dbus/dbus-glib.h (struct DBusGObjectInfo): Include
1833 exported_signals and exported_properties.
1834 (dbus_g_object_register_marshaller): Update prototype.
1835 (dbus_g_object_register_marshaller_array): Prototype.
1837 * test/glib/test-dbus-glib.c: Extend testing to cover new signals.
1839 * test/glib/test-service-glib.c: Add new test signals and method
1842 * test/glib/test-service-glib.xml: Add some test signals.
1844 * test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
1845 and my-object-marshal.h
1846 (test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
1847 my-object-marshal.c.
1848 (my-object-marshal.c, my-object-marshal.h): Implement.
1850 * test/glib/.cvsignore: Update.
1852 * doc/TODO: Remove two GLib TODO items fixed by this
1855 2005-06-16 Colin Walters <walters@verbum.org>
1857 * doc/TODO: Update for GLib bindings.
1859 2005-06-16 Colin Walters <walters@verbum.org>
1861 * glib/dbus-binding-tool-glib.c:
1862 * glib/dbus-gobject.c:
1863 * glib/dbus-gproxy.c: Add Nokia copyright; Patch
1864 from Ross Burton, for his GLib bindings work.
1866 2005-06-16 Colin Walters <walters@verbum.org>
1868 * glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
1869 to iterate instead of walking to G_TYPE_INVALID.
1871 Patch based on a patch from Ryan Gammon.
1873 2005-06-16 Colin Walters <walters@verbum.org>
1875 * bus/bus.c (bus_context_new): Set parser to NULL
1876 after we unref it (Patch from Chris Boscolo, #2174).
1878 2005-06-16 Colin Walters <walters@verbum.org>
1880 * python/dbus_bindings.pyx.in: Import size_t,
1881 __int64_t, __uint64_t, and __signed.
1883 * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (write_credentials_byte):
1884 Define cmsg struct, output it.
1885 (_dbus_read_credentials_unix_socket):
1888 Patch from Joe Markus Clarke for FreeBSD support.
1890 2005-06-16 Colin Walters <walters@verbum.org>
1892 * tools/dbus-send.c (append_array): Use strtok.
1893 (append_dict): New function.
1894 (type_from_name): New function, extracted from main.
1895 (main): Handle sending dicts.
1897 * tools/dbus-print-message.c (print_iter): Print dict
1900 2005-06-16 Colin Walters <walters@verbum.org>
1902 * glib/dbus-gvalue.c (marshal_basic): Marshal NULL string
1903 values as the empty string (#2948).
1905 2005-06-16 Colin Walters <walters@verbum.org>
1908 * mono/doc/Makefile.am:
1909 * test/glib/Makefile.am:
1911 Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
1913 2005-06-16 Colin Walters <walters@verbum.org>
1915 * dbus/dbus-marshal-header.c (_dbus_header_load): Set
1916 header byte order from expected byte order (Patch from Chris Wilson, #3475).
1918 * dbus/dbus-marshal-byteswap.c (byteswap_body_helper):
1919 Increment pointer after swapping fixed array. Add assertion
1922 2005-06-15 Colin Walters <walters@verbum.org>
1924 * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (_dbus_read_credentials_unix_socket):
1925 Fix call to dbus_set_error. (Patch from Michael Banck, #3461)
1927 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
1929 * NEWS: Update to 0.34
1931 2005-06-15 David Zeuthen <davidz@redhat.com>
1933 * configure.in (LT_CURRENT): Revert back to 1 as the library
1934 hasn't changed and we've certainly not committed to protocol
1935 stability yet. All this does is to break ABI. See commit note
1936 from hp@redhat.com 2005-05-05 for details.
1938 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
1940 * dbus/dbus-connection.c (_dbus_connection_peer_filter): New method
1941 (_dbus_connection_run_builtin_filters): New method
1942 (dbus_connection_dispatch): Run the builtin filters which in turn
1943 runs the peer filter which handles Ping messages.
1946 - Ping isn't handled: This patch fixes it
1948 - Add a test case for the Ping message: added TODO item
1950 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
1952 * dbus/dbus-message.c:
1953 (dbus_message_has_path): New method
1954 (dbus_message_has_interface): New method
1955 (dbus_message_has_member): New method
1957 * dbus/dbus/dbus-sysdeps.c (_dbus_check_dir_is_private_to_user):
1960 * dbus/dbus-keyring.c (_dbus_keyring_reload): Check to see that
1961 the keyring directory is private to the user
1964 - The convenience functions in dbus-bus.h should perhaps have
1965 the signatures that they would have if they were autogenerated
1966 stubs. e.g. the acquire service function. We should also evaluate
1967 which of these functions to include, in light of the fact that
1968 GLib/Qt native stubs will probably also exist.: Punted
1970 - add dbus_message_has_path(), maybe has_member/interface:
1973 - in dbus-keyring.c, enforce that the keyring dir is not
1974 world readable/writable: Fixed in this patch
1976 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
1978 * dbus/dbus-marshal-validate.h: Added a new validation
1979 error code DBUS_VALIDITY_UNKNOWN_OOM_ERROR = -4 for
1980 out of memory errors when validating signitures
1982 * dbus/dbus-marshal-header.c: use DBUS_VALIDITY_UNKNOWN_OOM_ERROR
1983 in places where we previously used DBUS_VALID and a FALSE return
1984 value to indicate OOM
1986 * dbus/dbus-marshal-validate.c (_dbus_validate_signature_with_reason):
1987 Use a stack to track the number of elements inside containers. The
1988 stack values are then used to validate that dict entries have only two
1989 elements within them.
1990 (validate_body_helper): check the reason for failure when validating
1993 * dbus/dbus-message.c (load_message): use
1994 DBUS_VALIDITY_UNKNOWN_OOM_ERROR in places where we previously used
1995 DBUS_VALID and a FALSE return value to indicate OOM
1997 * doc/TODO: remove "- validate dict entry number of fields" as this
2000 2005-06-14 David Zeuthen <davidz@redhat.com>
2002 * bus/bus.c (process_config_every_time): Drop existing conf-dir
2003 watches (if applicable) and add new watches
2005 * bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
2006 (main): Setup SIGIO signal handler if using D_NOTIFY
2008 * bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs
2010 * bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
2011 (merge_included): Also merge conf_dirs list
2012 (bus_config_parser_unref): Clear conf_dirs list
2013 (include_dir): Add directory to conf_dirs list
2014 (bus_config_parser_get_conf_dirs): New function
2016 * bus/dir-watch.[ch]: New files
2018 * bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]
2020 * configure.in: Add checks for D_NOTIFY on Linux
2022 2005-06-14 Colin Walters <walters@verbum.org>
2024 * glib/dbus-binding-tool-glib.c:
2025 * glib/dbus-gobject.c:
2026 * glib/dbus-gvalue.c: Fix indentation and brace style.
2028 2005-06-14 Ross Burton <ross@openedhand.com>.
2030 * glib/dbus-glib.h: Make DBusGMethodInvocation
2031 a private structure. Rearrange prototypes a bit.
2033 * glib/dbus-gproxy.c (dbus_g_proxy_invoke): Add
2034 documentation for first_arg_type.
2036 * glib/dbus-gobject.c: Move DBusGMethodInvocation
2037 here, add documentation. Move dbus_g_method_return
2038 and dbus_g_method_return_error into public API
2041 2005-06-14 Colin Walters <walters@verbum.org>
2043 * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller):
2044 Add missing return statements, noticed by Ross Burton.
2046 2005-06-13 Ross Burton <ross@openedhand.com>.
2048 * glib/dbus-gobject.c: Handle errors on message
2049 demarshalling by sending error message back.
2050 * glib/dbus-gvalue.c: Initialize return variables.
2052 2005-06-13 Colin Walters <walters@verbum.org>
2054 * glib/Makefile.am: Fix thinko in last patch.
2056 2005-06-13 Colin Walters <walters@verbum.org>
2058 * glib/Makefile.am: Move dbus-gtype-specialized.c
2059 and dbus-gtype-specialized.h into a _HEADERS variable,
2062 2005-06-12 Colin Walters <walters@verbum.org>
2064 Async signals and various bugfixes and testing by
2065 Ross Burton <ross@openedhand.com>.
2067 * glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
2068 (dbus_gvalue_genmarshal_name_from_type)
2069 (dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
2070 (dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
2071 (dbus_g_value_types_init, dbus_gtype_from_signature)
2072 (dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
2073 (dbus_gtypes_from_arg_signature): New function prototypes.
2074 (dbus_gvalue_demarshal): Take context and error arguments.
2075 (dbus_gvalue_demarshal_variant): New function.
2076 (dbus_gvalue_demarshal_message): New function.
2077 (dbus_gvalue_store): Delete.
2079 * glib/dbus-gvalue.c:
2081 File has been almost entirely rewritten; now we special-case
2082 more types such as DBUS_TYPE_SIGNATURE, handle arrays and
2083 hash tables correctly, etc. Full support for recursive values
2084 is not yet complete.
2086 * glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
2087 argument of signal to G_TYPE_POINTER since we now pass a
2089 (lookup_g_marshaller): Delete in favor of
2090 _dbus_gobject_lookup_marshaller.
2091 (marshal_dbus_message_to_g_marshaller): Use
2092 _dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
2093 to handle remote signal callbacks.
2094 (dbus_g_proxy_new_from_proxy): New function; creates a new
2095 DBusGProxy by copying an existing one.
2096 (dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
2097 (dbus_g_proxy_get_path): New functions.
2098 (dbus_g_proxy_marshal_args_to_message): New function;
2099 factored out of existing code.
2100 (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
2101 from a varargs array.
2102 (dbus_g_proxy_begin_call_internal): New function.
2103 (dbus_g_proxy_end_call_internal): New function.
2104 (dbus_g_proxy_begin_call): Take GTypes instead of DBus types
2105 as arguments; simply invoke dbus_g_proxy_begin_call_internal
2106 after collecting args into value array.
2107 (dbus_g_proxy_end_call): Take GTypes instead of DBus types;
2108 invoke dbus_g_proxy_end_call_internal.
2109 (dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
2111 (dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
2113 (array_free_all): New function.
2114 (dbus_g_proxy_add_signal): Take GTypes.
2116 * glib/dbus-gobject.h:
2117 (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
2118 (_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
2121 * glib/dbus-gobject.c: Add a global marshal_table hash which
2122 stores mappings from type signatures to marshallers. Change lots
2123 of invocations of dbus_gtype_to_dbus_type to
2124 dbus_gtype_to_signature.
2125 (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
2126 (introspect_signals): Fix test for query.return_type.
2127 (set_object_property): Update invocation of dbus_gvalue_demarshal.
2128 (invoke_object_method): Many changes. Handle asynchronous
2129 invocations. Convert arguments with
2130 dbus_gvalue_demarshal_message. Handle errors. Use
2131 DBusSignatureIter instead of strlen on args. Handle all arguments
2132 generically. Special-case variants.
2133 (dbus_g_method_return, dbus_g_method_return_error): New function.
2134 (DBusGSignalClosure): New structure, closes over signal
2136 (dbus_g_signal_closure_new): New function.
2137 (dbus_g_signal_closure_finalize): New function.
2138 (signal_emitter_marshaller): New function; is special marshaller
2139 which emits signals on bus.
2140 (export_signals): New function; introspects object signals and
2142 (dbus_g_object_type_install_info): Take GType instead of
2144 (dbus_g_connection_register_g_object): Invoke export_signals.
2145 (dbus_g_connection_lookup_g_object): New function.
2146 (DBusGFuncSignature) New structure; used for mapping type
2147 signatures to marshallers.
2148 (funcsig_hash): New function; hashes DBusGFuncSignature.
2149 (funcsig_equal): New function; compares DBusGFuncSignature.
2150 (_dbus_gobject_lookup_marshaller): New function.
2151 (dbus_g_object_register_marshaller): New function; used to
2152 register a marshaller at runtime for a particular signature.
2154 * glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.
2156 * glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
2157 which notes a server method implementation should be
2160 * glib/dbus-binding-tool-glib.c
2161 (dbus_binding_tool_output_glib_server): Call
2162 dbus_g_value_types_init.
2163 (write_formal_parameters): Use dbus_gtype_from_signature. Handle
2165 (dbus_g_type_get_lookup_function): Turn GType into an invocation
2166 of a lookup function.
2167 (write_args_for_direction): Use dbus_g_type_get_lookup_function.
2168 (write_untyped_out_args): New method; write output arguments.
2169 (write_formal_declarations_for_direction): Function for
2171 (write_formal_parameters_for_direction): Function for
2172 writing implementations.
2173 (write_typed_args_for_direction): Function for writing
2174 arguments prefixed with GTypes.
2175 (write_async_method_client): Write out async version
2178 * glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
2179 (dbus_g_type_get_marshal_name): Move mapping from GType
2180 to marshal name into here.
2181 (dbus_g_type_get_c_name): Move into here.
2182 (compute_marshaller): Convert signature to type with
2183 dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
2184 (compute_marshaller_name): Ditto.
2185 (compute_marshaller): Handle async signal annotations.
2186 (gather_marshallers): Return if we don't have a known
2188 (generate_glue): Collect introspection blob here, and
2189 write all of the blob at the end. This allows an object
2190 with multiple interfaces to work.
2191 Mark async methods in introspection blob.
2193 * glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
2194 dbus-gtype-specialized.c, dbus-gtype-specialized.h,
2195 dbus-gvalue-utils.h, dbus-gvalue-utils.c.
2197 * dbus/dbus-glib.h: Don't include dbus-protocol.h; this
2198 avoids people accidentally using DBUS_TYPE_* which should
2199 not be necessary anymore.
2200 Do include dbus-gtype-specialized.h, which are utilities
2201 for GLib container types.
2202 Add various #defines for types such as
2203 DBUS_TYPE_G_BOOLEAN_ARRAY.
2204 (DBusGValueIterator, DBusGValue): Define, not fully used
2206 (dbus_g_value_get_g_type): Type for recursive value.
2207 (dbus_g_value_open, dbus_g_value_iterator_get_value)
2208 (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
2209 (dbus_g_value_free): Prototypes.
2210 (dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
2211 (dbus_g_proxy_set_interface): Prototype.
2212 (dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
2213 (dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
2215 (dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
2217 (DBusGAsyncData, DBusGMethodInvocation): Structures for
2218 doing async invocations.
2219 (dbus_g_method_return, dbus_g_method_return_error):
2221 * doc/dbus-tutorial.xml: Update GLib section.
2223 * tools/dbus-viewer.c (load_child_nodes): Update
2224 for new invocation type of dbus_g_proxy_end_call.
2225 (load_from_service_thread_func): Ditto.
2227 * tools/print-introspect.c (main): Ditto.
2229 * tools/dbus-names-model.c (have_names_notify)
2230 (names_model_reload, names_model_set_connection)
2233 * python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
2234 needed since Python bindings use GLib bindings.
2236 * test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
2237 Add --prefix argument.
2239 * tools/Makefile.am: Define DBUS_COMPILATION. Remove
2240 unneeded --ignore-unsupported arg.
2242 * test/glib/test-service-glib.c:
2243 * test/glib/test-service-glib.xml:
2244 * test/glib/test-dbus-glib.c: Add many more tests.
2246 2005-06-06 David Zeuthen <davidz@redhat.com>
2248 * doc/TODO: Add item about need to remove deprecated functions.
2250 * dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect
2252 * dbus/dbus-connection.c (dbus_connection_disconnect): New function
2253 to repair the ABI which was broken with the last commit.
2255 2005-06-02 John (J5) Palmieri <johnp@redhat.com>
2257 * dbus/dbus-connection.c, dbus/dbus-connection.h
2258 (dbus_connection_disconnect): renamed to dbus_connection_close
2259 for API symmetry with dbus_connection_open
2260 (_dbus_connection_open_internal):
2261 s/dbus_connection_disconnect/dbus_connection_close
2263 * dbus/dbus-bus.c (dbus_bus_get):
2264 s/dbus_connection_disconnect/dbus_connection_close
2266 * bus/connection.c (bus_connections_unref,
2267 bus_connections_setup_connection, bus_connections_expire_incomplete):
2268 s/dbus_connection_disconnect/dbus_connection_close
2270 * bus/dispatch.c (bus_dispatch, kill_client_connection,
2271 kill_client_connection_unchecked, check_hello_connection):
2272 s/dbus_connection_disconnect/dbus_connection_close
2274 * bus/bus.c (new_connection_callback):
2275 s/dbus_connection_disconnect/dbus_connection_close
2277 * tools/dbus-send.c (main):
2278 s/dbus_connection_disconnect/dbus_connection_close
2280 * test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
2281 s/dbus_connection_disconnect/dbus_connection_close
2283 * test/test-service.c (path_message_func, filter_func):
2284 s/dbus_connection_disconnect/dbus_connection_close
2286 * doc/TODO: remove connection_open/connection_disconnect lacks symmetry item that was just fixed
2288 2005-05-25 Colin Walters <walters@verbum.org>
2290 * dbus/dbus-protocol.h: Move various bus service #defines such
2291 as DBUS_SERVICE_DBUS and DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT to
2293 * dbus/dbus-shared.h: Various defines moved here.
2294 * dbus/dbus-marshal-header.c: Include dbus-shared.h.
2296 2005-05-25 John (J5) Palmieri <johnp@redhat.com>
2298 * python/__init__.py: Python bindings deserve a minor version
2299 update. Upped to (0, 40, 2)
2301 2005-05-24 John (J5) Palmieri <johnp@redhat.com>
2303 * python/decorators.py: add explicitly_pass_message decorator
2304 for passing in the dbus message as keyword for edge case signal
2307 * python/matchrules.py (SignalMatchRule.__repr__): fix output
2308 to conform with what dbus expects for match rules
2309 (SignalMatchRule.execute): add the dbus message as a keyword
2310 if the signal handler has requested it
2312 * python/examples/example/signal-recipient.py: added some more
2313 examples on how to hook up to signals
2315 2005-05-23 John (J5) Palmieri <johnp@redhat.com>
2317 * python/decorators.py: import dbus_bindings
2319 * python/matchrules.py (SignalMatchRule, SignalMatchTree,
2320 SignalMatchNode): new classes that implement wildcard signal
2321 callback matching using a tree lookup. Heavily modified from a
2322 patch sent by Celso Pinto (fd.o bug #3241)
2324 * _dbus.py (add_signal_receiver, remove_signal_receiver, _signal_func):
2325 use new match classes to handle signals.
2327 2005-05-19 John (J5) Palmieri <johnp@redhat.com>
2329 * python/dbus_bindings.pyx.in: s/TYPE_PATH/TYPE_OBJECT_PATH
2331 2005-05-18 Havoc Pennington <hp@redhat.com>
2333 * configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
2334 gettext. Not really worth requiring yet perhaps, but any
2335 production quality 1.0 would require it so we should go ahead and
2336 get things set up. We do have a couple token calls to
2337 bindtextdomain in the code already.
2339 2005-05-16 John (J5) Palmieri <johnp@redhat.com>
2341 * glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
2342 when using recursive g_main_loops
2344 * python/_dbus.py (class Bus): add the ProxyObjectClass
2345 alias for ProxyObject to make it easier for the Twisted
2346 networking framework to integrate dbus.
2348 * python/proxies.py (class ProxyObject): add the ProxyMethodClass
2349 alias for ProxyMethod to make it easier for the Twisted
2350 networking framework to integrate dbus.
2352 2005-05-11 Ross Burton <ross@openedhand.com>
2354 * glib/dbus-glib-tool.c: Add --prefix argument.
2355 * glib/dbus-binding-tool-glib.h: Add prefix argument.
2356 * glib/dbus-binding-tool-glib.c (compute_marshaller_name):
2357 Add prefix argument.
2358 (generate_glue): Pass prefix argument down.
2359 (dbus_binding_tool_output_glib_server): Pass prefix to
2362 2005-05-11 Colin Walters <walters@verbum.org>
2364 * tools/dbus-send.c (append_array): New function.
2365 (append_arg): Broken out from main.
2366 (main): Add cheesy hack to send arrays and variants.
2368 * tools/dbus-print-message.c (print_iter): Broken out
2371 2005-05-11 Colin Walters <walters@verbum.org>
2373 * dbus/dbus-signature.c (dbus_signature_iter_get_signature):
2374 New function, returns signature string for signature iter.
2375 * dbus/dbus-signature.h: Prototype it.
2376 * dbus/dbus-message.c (dbus_message_iter_get_signature):
2377 New function, returns signature string for message iter.
2378 (dbus_message_iter_get_array_len): New function, returns
2380 (dbus_message_iter_get_fixed_array): Fix assertion; this
2381 function should be used when the iter is pointing to the
2382 contents of an array
2383 * dbus/dbus-message.h: Prototypes.
2384 * dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
2385 New function; returns length of an array.
2386 * dbus/dbus-marshal-recursive.h: Prototype it.
2388 2005-05-11 Colin Walters <walters@verbum.org>
2390 * dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
2393 2005-05-08 Havoc Pennington <hp@redhat.com>
2395 * dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
2396 daemon's pid, not the parent's pid, to the file descriptor.
2397 Reported by Taj Morton.
2399 2005-05-05 Havoc Pennington <hp@redhat.com>
2401 * configure.in (LT_*): add notes on how the libtool versioning
2402 works to save thinking. Increment soname to indicate protocol
2403 breakage (though really the library interface hasn't changed I
2406 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
2407 verify the GUID received from server matches what we were
2408 expecting, if we had an expectation
2410 * dbus/dbus-auth.c (send_ok): send GUID along with the OK command
2411 (_dbus_auth_get_guid_from_server): new function
2412 (send_begin): parse the OK args
2414 * doc/dbus-specification.xml: add GUID to the auth protocol
2416 2005-05-05 John (J5) Palmieri <johnp@redhat.com>
2418 * Fix my name in previous changelog ;)
2420 * python/proxies.py (ProxyObject.__getattr__): add further patch
2421 from Anthony Baxter to throw an AttributeError when python
2422 __special__ functions are called instead of marshling them over
2423 the bus (Bug#1685 comment 3).
2425 2005-05-04 John (J5) Palmieri <johnp@redhat.com>
2427 * python/Makefile.am: changed to use pyexecdir for the binding
2428 shared libraries (Bug#2494)
2430 * python/exceptions.py: bring exceptions over from the bindings
2431 so they can be used in applications (Bug#2036)
2432 Make all exceptions derive from DBusException
2434 * python/_dbus.py, python/proxies.py: implement __repr__ in a couple
2435 of classes so that print obj doesn't throw an exception (Bug #1685)
2437 2005-05-03 Ross Burton <ross@openedhand.com>
2439 * glib/dbus-gobject.c (dbus_g_connection_register_g_object):
2440 Return if we get an error during registration. Set up a
2441 weak reference on object to unregister if object is destroyed.
2442 (unregister_gobject): New function.
2444 2005-05-01 John (J5) Palmieri <johnp@redhat.com>
2446 * python/dbus_bindings.pyx.in:
2447 - added new type classes for hinting to the marashaler what type
2448 to send over the wire
2449 - added int16 and uint16 marshalers
2450 - Fixed a bug in the type constants that caused int32 to go out
2451 as uint16 over the wire
2452 * python/dbus.py: split up into different files and renamed _dbus.py
2453 * python/__init__.py, python/_util.py, python/decorators.py,
2454 python/exceptions.py, python/proxies.py, python/services.py,
2455 python/types.py: new files split off from dbus.py
2456 * python/Makefile.am: Add new files, remove dbus.py and
2457 install all python files to <python module dir>/dbus
2458 * python/examples/*: Added #!/usr/bin/env python to the top of
2459 every example. Patch provided by Tatavarty Kalyan
2461 2005-04-25 John (J5) Palmieri <johnp@redhat.com>
2463 * NEWS: Update to 0.33
2465 2005-04-25 John (J5) Palmieri <johnp@redhat.com>
2467 * python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
2468 method for doing async calls
2469 (_pending_call_notification): New C function for handling pendning call
2471 (set_notify): New method for setting pending call notification
2473 * python/dbus.py: new version tuple "version" is set at (0, 40, 0)
2474 Async capabilities added to remote method calls
2475 (Sender): class removed
2476 (RemoteService): class removed
2477 (ObjectTree): class removed for now
2478 (RemoteObject): Renamed to ProxyObject
2479 (RemoteMethod): Renamed to ProxyMethod
2480 (method): Decorator added for decorating python methods as dbus methods
2481 (signal): Decorator added for decorating python methods as signal emitters
2482 (ObjectType): Metaclass added for generating introspection data and the
2483 method callback vtable
2484 (Interface): Wrapper class added to wrap objects in a dbus interface
2485 (Object): Uses ObjectType as its metaclass and exports Introspect
2486 of the org.freedesktop.DBus.Introspectable interface
2487 (ValidationException, UnknownMethodException): new exceptions
2489 * python/examples/*: Modified to fit with the new bindings
2491 2005-04-23 Havoc Pennington <hp@redhat.com>
2493 * dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
2494 reported by Tony Houghton
2496 * test/test-service.c (main): test
2497 dbus_connection_get_object_path_data()
2499 * dbus/dbus-object-tree.c (find_handler): be sure we always init
2501 (_dbus_object_tree_get_user_data_unlocked): new function used by
2502 dbus_connection_get_object_path_data()
2503 (do_register): add assertion test for get_user_data_unlocked
2504 (object_tree_test_iteration): more tests
2506 * dbus/dbus-connection.c (dbus_connection_get_object_path_data):
2507 new function from Dan Reed to let you get the user data from
2508 dbus_connection_register_object_path()
2510 2005-04-23 John (J5) Palmieri <johnp@redhat.com>
2512 * dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
2513 in numerous places that did not account for the NULL terminator
2514 (signature_from_seed): changed the manual string copy loop to
2515 just use strcpy instead
2516 make check should now pass
2518 2005-04-19 John (J5) Palmieri <johnp@redhat.com>
2520 * dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
2521 so that it allows messages that are not signals to pass in
2522 NULL as the interface.
2524 2005-04-18 David Zeuthen <davidz@redhat.com>
2526 * glib/dbus-gmain.c (io_handler_destroy_source):
2527 (timeout_handler_destroy_source, connection_setup_free):
2528 Also unref the source to avoid memory leaks.
2530 2005-04-13 David Zeuthen <davidz@redhat.com>
2532 * bus/config-parser.c (bus_config_parser_new): Bump this to a
2533 more reasonable, yet still totally arbitrary, value :-).
2535 2005-04-13 David Zeuthen <davidz@redhat.com>
2537 * doc/TODO: Added an "important for 1.0" item about selinux
2540 2005-04-13 David Zeuthen <davidz@redhat.com>
2542 * bus/selinux.c: Add c-file-style to top of file
2543 (log_audit_callback): Don't free the data here anymore
2544 (bus_selinux_check): Don't take spid and tpid since appending
2545 that to auxdata may OOM.
2546 (bus_selinux_allows_acquire_service): Handle OOM and signal back
2547 to the caller if we are OOM by taking an error object.
2548 (bus_selinux_allows_send): -do-
2550 * bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
2551 and bus_selinux_allows_send
2553 * bus/bus.c (bus_context_check_security_policy): Pass error and
2554 pass on OOM thrown by bus_selinux_allows_send()
2556 * bus/services.c (bus_registry_acquire_service): Pass error and
2557 pass on OOM thrown by bus_selinux_allows_acquire_service()
2559 2005-04-13 Havoc Pennington <hp@redhat.com>
2561 * glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
2562 message at a time to avoid monopolizing the main loop, bug
2563 #2953 from Benjamin Otte
2565 2005-04-09 Havoc Pennington <hp@redhat.com>
2567 * dbus/dbus-string.c (copy): change a memcpy to memmove due to
2568 possible overlap, fix from Daniel Reed
2569 (fixup_alignment): fix signedness warnings
2570 (_dbus_string_append_unichar): ditto
2572 2005-04-09 Havoc Pennington <hp@redhat.com>
2574 * dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
2576 * glib/dbus-glib-tool.c (main): fix warning
2578 * glib/dbus-binding-tool-glib.c (generate_glue): fix warning
2580 * dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
2581 add a new function that can be used in simple applications that
2582 don't have a main loop and are willing to block
2584 2005-04-05 David Zeuthen <davidz@redhat.com>
2586 Fix https://bugs.freedesktop.org/show_bug.cgi?id=2889
2588 * glib/dbus-gmain.c:
2589 (io_handler_destroy_source): Remove from list of IO handlers
2590 of the ConnectionSetup object
2591 (timeout_handler_destroy_source): -do- for timeout handlers
2592 (io_handler_source_finalized): Don't remove from list since
2593 we now do that in io_handler_destroy_source(). Renamed from
2594 io_handler_source_destroyed
2595 (timeout_handler_source_destroyed): -do- for timeout handlers
2596 (connection_setup_free): It is now safe to iterate over all
2597 IO and timeout handlers as the _destroy_source removes them
2598 from the list synchronously
2600 2005-03-30 Havoc Pennington <hp@redhat.com>
2602 * configure.in: change check to gtk 2.4
2604 * tools/dbus-viewer.c (name_combo_changed_callback): remove
2605 gtk_combo_box_get_active_text() usage to decrement GTK requirement
2608 2005-03-29 John (J5) Palmieri <johnp@redhat.com>
2612 * HACKING: Fixed realease instructions. configure.in should be updated to
2613 the next release by the person who made the last release.
2615 2005-03-29 John (J5) Palmieri <johnp@redhat.com>
2617 * python/lvalue_cast_post_process.py - removed. Patch has been
2618 submitted to Pyrex maintainers that fixes gcc4.0 errors
2620 * python/Makefile.am: removed refrences to lvalue_cast_post_process.py
2622 2005-03-24 Daniel Reed <n@ml.org>
2624 * tools/Makefile.am: Make print-introspect and
2625 dbus-bus-introspect.xml building conditional on HAVE_GLIB.
2627 2005-03-22 John (J5) Palmieri <johnp@redhat.com>
2629 * tools/Makefile.am: Patch by Colin Walters that fixes distcheck
2631 * dbus/dbus-userdb.c, dbus/dbus-userdb-util.c: Add patch we have
2632 had in Red Hat packages for a while but for some reason never
2634 (_dbus_is_a_number): New checks if a string
2635 can be converted to a number and does the conversion if it can
2636 (_dbus_user_database_lookup): Add check to see if the given username
2637 is a udi. This allows udi's to be used instead of usernames in the
2639 (_dbus_user_database_lookup_group): Add check to see if the given groupname
2640 is a gdi. This allows gdi's to be used instead of groupnames in the
2643 2005-03-21 John (J5) Palmieri <johnp@redhat.com>
2645 * python/lvalue_cast_post_process.py - added post processor to fix Pyrex
2646 code so that it compiles with gcc4.0
2648 * python/Makefile.am: Added lvalue_cast_post_process.py to EXTRA_DIST
2649 run dbus_bindings.c through lvalue_cast_post_process.py and copy the
2650 results back to dbus_binding.c
2652 2005-03-20 Colin Walters <walters@verbum.org>
2654 Patch suggested by Inguva Rajasekhar <ringuva@novell.com>.
2656 * configure.in: Require GTK+ 2.6.
2658 2005-03-20 Colin Walters <walters@verbum.org>
2660 * Makefile.am (SUBDIRS, DIST_SUBDIRS): Build tools before test.
2662 2005-03-17 Tom Parker <palfrey@tevp.net>
2664 * dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
2665 print DBUS_UID_UNSET; instead print passed username. Also
2666 be sure to actually use gid looked up in cache.
2668 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
2669 for DBUS_GID_UNSET and groupname.
2671 2005-03-17 Colin Walters <walters@verbum.org>
2673 * bus/print-introspect.c: Move to tools/.
2674 * bus/run-with-tmp-session-bus.sh: Ditto.
2676 * glib/Makefile.am (dbus-glib-bindings.h): Move
2677 generation to tools/Makefile.am.
2679 * test/glib/run-test.sh: Update to handle move
2680 of run-with-tmp-session-bus.sh.
2682 * test/glib/test-service-glib.c: Update to handle
2683 move of dbus-glib-bindings.h.
2685 * tools/print-introspect.c: Moved here
2686 from bus/, and ported to GLib bindings.
2688 * tools/run-with-tmp-session-bus.sh: Moved here
2691 * tools/Makefile.am: Generate dbus-glib-bindings.h
2692 and dbus-bus-introspect.xml here.
2694 * tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
2697 2005-03-17 Colin Walters <walters@verbum.org>
2699 * bus/driver.c (write_args_for_direction): Use
2700 _dbus_string_get_const_data to retrieve string;
2701 _dbus_string_get_const_data_len doesn't actually return
2702 a NULL-terminated substring.
2704 * test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
2705 (main): Change to use org_freedesktop_DBus_request_name
2706 instead of using g_proxy_begin_call/end_call.
2708 2005-03-15 Joe Shaw <joeshaw@novell.com>
2710 * mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
2711 generating the finalizer. Fixes from Ben Maurer.
2713 2005-03-12 Joe Shaw <joeshaw@novell.com>
2715 * mono/BusDriver.cs: Update method names: ListServices
2716 becomes ListNames; GetOwner becomes GetNameOwner.
2718 * mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
2719 onto the eval stack when removing the delegate.
2721 2005-03-12 Joe Shaw <joeshaw@novell.com>
2723 * mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
2724 LT_CURRENT. Set it to the autoconf variable.
2726 * mono/ProxyBuilder.cs: Add a finalizer to the generated proxy
2727 classes that disconnects the signal handler delegate from the
2728 service object. Fixes a big leak of proxy objects on the
2729 client side of things. Patch from Ben Maurer
2730 <bmaurer@ximian.com>
2732 2005-03-12 Colin Walters <walters@verbum.org>
2734 * bus/driver.c (write_args_for_direction): New function,
2735 parses a type signature into arguments and outputs to
2737 (bus_driver_handle_introspect): Use it instead of
2738 hardcoding XML for certain signatures.
2740 * bus/Makefile.am (dbus-bus-introspect.xml): Add
2741 dependency on dbus-daemon.
2743 * glib/dbus-glib-tool.c (main): Parse ignore_unsupported
2744 argument, pass it to dbus_binding_tool_output_glib_client.
2746 * glib/dbus-binding-tool-glib.c
2747 (generate_client_glue): Protect against multiple inclusion.
2748 (dbus_binding_tool_output_glib_client): Add
2749 G_BEGIN_DECLS/G_END_DECLS.
2751 * glib/dbus-binding-tool-glib.c (compute_client_method_name):
2752 Change to just take iface prefix directly.
2753 (write_formal_parameters): Clarify error message.
2754 (check_supported_parameters): New function; checks to see type
2755 signatures of method parameters are supported.
2756 (generate_client_glue): Handle ignore_unsupported flag.
2757 (dbus_binding_tool_output_glib_client): Handle ignore_unsupported
2760 * glib/Makefile.am (dbus-glib-bindings.h): Pass
2761 --ignore-unsupported by default until glib bindings
2764 2005-03-11 Colin Walters <walters@verbum.org>
2766 * glib/Makefile.am: Generate dbus-glib-bindings.h and
2769 * bus/print-introspect.c: New file; prints introspection
2770 data for a given name and object path.
2772 * bus/run-with-tmp-session-bus.sh: New file, refactored
2773 from test/glib/run-test.sh. Creates a temporary session
2774 bus and runs another program.
2776 * test/glib/run-test.sh: Refactor to invoke
2777 run-with-tmp-session-bus.sh.
2779 * bus/driver.c (bus_driver_handle_introspect): Fix to print new
2780 introspection format. Also change to use DBUS_TYPE_x_AS_STRING
2781 macros instead of hardcoding.
2783 * glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
2785 2005-03-11 Joe Shaw <joeshaw@novell.com>
2787 * dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
2788 this unref; it doesn't match up evenly in some codepaths.
2789 (_dbus_connection_block_pending_call): Unref at every exitpoint;
2790 this evenly matches with the ref near the top of this function.
2792 2005-03-09 Joe Shaw <joeshaw@novell.com>
2794 * dbus/dbus-object-tree.c
2795 (_dbus_object_tree_unregister_and_unlock): If checks are enabled
2796 and we try to unregister a path that's not registered, still go
2797 through the process of unlocking and don't just return.
2799 2005-03-09 Colin Walters <walters@verbum.org>
2801 * glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
2802 to this are generated for client-side wrappers. Invokes a
2803 D-BUS method and returns reply values.
2805 * glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
2806 function; writes signature string for argument direction.
2807 (write_args_for_direction): Change to pass input values directly
2808 instead of via address, and fix indentation.
2809 (generate_client_glue): Change to invoke dbus_g_proxy_invoke. Also
2810 make generated wrappers inlineable.
2812 * dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
2813 note about using dbus_type_is_fixed.
2815 * dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
2816 dbus/dbus-signature.c as dbus_type_is_fixed.
2818 All callers updated.
2820 * dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
2821 from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
2823 * dbus/dbus-signature.h: Prototype.
2825 * glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
2828 * test/glib/test-dbus-glib.c (main): Be sure to clear error as
2829 appropriate instead of just freeing it.
2830 (main): Free returned strings using g_free.
2832 * test/glib/Makefile.am (test-service-glib-glue.h)
2833 (test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
2835 * glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
2836 simply maps a simple D-BUS type to GType.
2837 (dbus_dbus_type_to_gtype): Function which maps D-BUS type to
2839 (dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
2840 initialize the value with it.
2841 (dbus_gvalue_binding_type_from_type): Unused, delete.
2842 (dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
2843 various types instead of unmarshalling to value data directly.
2844 Remove can_convert boolean.
2845 (dbus_gvalue_marshal): Remove duplicate initialization; switch to
2846 returning directly instead of using can_convert boolean.
2847 (dbus_gvalue_store): New function; not related to D-BUS per-se.
2848 Stores a GValue in a pointer to a value of its corresponding C
2851 * glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
2852 add dbus_gvalue_store.
2854 2005-03-08 Joe Shaw <joeshaw@novell.com>
2856 Fix a bunch of lifecycle and memory management problems
2857 in the mono bindings.
2859 * mono/Arguments.cs (Arguments): Implement IDisposable
2861 * mono/Bus.cs (Bus): Don't allow public instantiation. This is
2862 strictly a static class.
2864 * mono/Connection.cs: Move the DBusObjectPathVTable and associated
2865 delegates into this file.
2866 (Connection): Implement IDisposable.
2867 (Dispose): Disconnect the connection and set the raw connection
2868 pointer to IntPtr.Zero.
2869 (~Connection): Call Dispose().
2870 (RegisterObjectPath): Added. Manages the registration of object
2871 paths so we can cleanly disconnect them at dispose/finalize time.
2872 (UnregisterObjectPath): Ditto.
2873 (set_RawConnection): Unregister all of the object paths when
2874 changing the underlying DBusConnection. Add them back onto the
2875 new connection, if any.
2877 * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
2878 more unmanaged resources anymore, so it's not necessary. Move all
2879 the DBusObjectPathVTable stuff out of here.
2880 (Handler): Save references to our delegates so that they don't get
2881 finalized. Call Connection.RegisterObjectPath() instead of
2882 dbus_connection_register_object_path() directly.
2883 (Message_Called): Dispose the message after we're finished with
2886 * mono/Message.cs (Message): Implement IDisposable.
2887 (Dispose): Dispose the Arguments, and set the RawMessage to
2889 (SendWithReplyAndBlock): We own the ref to the reply that comes
2890 back from dbus_connection_send_with_reply_and_block() so add a
2891 comment about that and unref it after we've constructed a managed
2892 MethodReturn class around it. Fixes a big, big leak.
2894 * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
2896 (BuildSignalHandler): After we've sent the Signal message, dispose
2898 (BuildMethod): Dispose of the method call and reply messages after
2899 we've sent the message and extracted the data we want from the
2902 * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
2904 (Service_FilterCalled): Dispose of the message after we're
2907 2005-03-08 Joe Shaw <joeshaw@novell.com>
2909 * dbus/dbus-connection.c (dbus_connection_send_with_reply):
2910 After we attach our pending call to the connection, unref
2913 * mono/Connection.cs (set_RawConnection): Disconnect our
2914 filter and match callbacks from the old connection and
2915 reconnect them to the new connection, if any.
2917 * mono/DBusType/Array.cs: "Code" is a static member, so
2918 don't use "this" to refer to it. Fix for stricter checking
2921 * mono/DBusType/ObjectPath.cs (Append): Don't leak the
2922 object path that we pass into unmanaged code.
2924 * mono/DBusType/String.cs (Append): Don't leak the string
2925 that we pass into unmanged code.
2927 2005-03-07 John (J5) Palmieri <johnp@redhat.com>
2928 * NEWS: Update for 0.31
2930 * configure.in: Release 0.31
2931 add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
2933 * qt/Makefile.am: fixed build
2935 * dbus/Makefile.am: soname bump for libdbus
2937 * glib/Makefile.am: soname bump for libdbus-glib
2939 2005-03-05 Havoc Pennington <hp@redhat.com>
2941 * dbus/dbus-sysdeps.c:
2942 (pseudorandom_generate_random_bytes_buffer): fix to have no return
2944 (_dbus_generate_random_bytes_buffer): fix return value
2946 * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
2947 checks actually work, from Tom Parker <fdo@tevp.net>
2949 2005-03-01 Colin Walters <walters@verbum.org>
2951 * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
2952 functions copied from dbus-glib-tool.c.
2953 (main): Convert lots of error code to use them.
2954 Also add some testing for introspection bits.
2956 2005-03-01 Colin Walters <walters@verbum.org>
2958 * doc/TODO: Remove introspection signature TODO.
2960 2005-02-27 Colin Walters <walters@verbum.org>
2962 * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
2963 Change return value to const char * instead of int so we can do
2965 (struct PropertyInfo, struct ArgInfo): Store char *.
2966 (property_info_new, arg_info_new): Update parameters, strdup.
2967 (property_info_unref, arg_info_unref): Free.
2969 * glib/dbus-gidl.h: Update prototypes.
2971 * glib/dbus-gparser.c (basic_type_from_string): Delete.
2972 (validate_signature): New function, just validates signature and
2974 (parse_property, parse_arg): Invoke validate_signature. Store
2975 signature instead of just type code.
2977 * glib/dbus-gvalue.c (base_type_from_signature): New utility
2978 function to return a primary type for a signature, dropping
2979 information about types in container types.
2980 (dbus_gvalue_genmarshal_name_from_type)
2981 (dbus_gvalue_binding_type_from_type)
2982 (dbus_gvalue_ctype_from_type): Update to take full signature
2983 instead of type code.
2984 (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
2986 * glib/dbus-gvalue.h: Update prototypes for above.
2988 * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
2989 glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
2990 (introspect_properties, introspect_signals, write_interface):
2991 Update to handle signatures, and remove usage of
2992 _dbus_gutils_type_to_string.
2993 (handle_introspect): Print out type codes instead of e.g. "string"
2994 in hardcoded introspection XML; also use x_AS_STRING constants
2995 instead of hardcoding in string.
2997 * glib/dbus-glib-tool.c (pretty_print): Handle signature change
2998 to string. Remove usage of _dbus_gutils_type_to_string.
3000 * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
3002 * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
3005 * glib/dbus-binding-tool-glib.c (compute_marshaller)
3006 (compute_marshaller_name, generate_glue): Handle signature change
3008 (write_formal_parameters, write_args_for_direction): Ditto, and
3011 * tools/dbus-tree-view.c (type_to_string): Delete.
3012 (info_set_func_text): Update to print full signatures.
3014 * test/glib/test-service-glib.xml: Change types to new
3015 introspection format.
3017 2005-02-26 Havoc Pennington <hp@redhat.com>
3019 * doc/TODO: remove the "guid" item
3021 * test/glib/test-profile.c (no_bus_thread_func): use open_private
3022 (with_bus_thread_func): use open_private
3024 * dbus/dbus-connection.c (dbus_connection_open_private): new
3025 function that works like the old dbus_connection_open()
3026 (dbus_connection_open): now returns an existing connection if
3029 * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
3030 through the GUID to the transport
3032 * dbus/dbus-server.c (_dbus_server_init_base): keep around the
3033 GUID in hex-encoded form.
3035 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3036 pass GUID argument in to the transport
3038 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
3041 * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
3043 * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
3045 2005-02-25 Havoc Pennington <hp@redhat.com>
3047 * doc/dbus-specification.xml: document the GUID thing
3049 * dbus/dbus-server.c (_dbus_server_init_base): initialize a
3050 globally unique ID for the server, and put a "guid=hexencoded"
3051 field in the address
3053 * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
3055 * dbus/dbus-message.c: ditto
3057 * dbus/dbus-dataslot.c: ditto
3059 * dbus/dbus-list.c: ditto
3061 * dbus/dbus-internals.h: wait, just include
3062 dbus-threads-internal.h here
3064 * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
3067 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
3069 2005-02-24 Colin Walters <walters@verbum.org>
3071 * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
3073 2005-02-24 John (J5) Palmieir <johnp@redhat.com>
3075 * glib/Makefile.am: added dbus-gobject.h to sources list
3076 so distcheck doesn't fail
3078 2005-02-24 Havoc Pennington <hp@redhat.com>
3080 * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
3081 you must disconnect before unref, since locking and other things
3082 are screwed up otherwise. Fix assorted other locking stuff.
3084 * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
3087 * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
3088 into a private header and don't export from the library
3090 * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
3092 2005-02-24 Colin Walters <walters@verbum.org>
3094 * dbus/dbus-signature.c: New file; implements various functions
3095 related to type signatures. Includes an interator for parsing,
3096 validation functions.
3097 (dbus_type_is_basic): Moved here from
3098 dbus-marshal-basic.c:_dbus_type_is_basic.
3099 (dbus_type_is_container): Moved here from
3100 dbus-marshal-basic.c:_dbus_type_is_container.
3102 All callers of _dbus_type_is_container and _dbus_type_is_basic
3103 updated, and include dbus-signature.h.
3105 * dbus/dbus-signature.h: New file; prototypes for the above.
3107 * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
3110 * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
3111 function factored out of _dbus_first_type_in_signature.
3112 (_dbus_first_type_in_signature_c_str): New function; returns first
3113 type code for a type signature character.
3115 * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
3116 handle function moves.
3118 * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
3120 * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
3121 function; skips to next complete type in type signature.
3122 Implemented using previous skip_one_complete_type. Now
3123 skip_one_complete_type just delegates to
3124 _dbus_type_signature_next.
3126 * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
3128 (_dbus_type_is_container): Ditto.
3130 * doc/dbus-specification.xml: Update introspection sample to
3131 use real type signatures.
3133 * dbus/dbus-test.h: Prototype signature test.
3135 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
3138 * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
3140 2005-02-23 John (J5) Palmieri <johnp@redhat.com>
3142 * python/dbus_bindings.pyx.in (PendingCall::get_reply):
3143 s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
3145 2005-02-21 Colin Walters <walters@verbum.org>
3147 * dbus/dbus-test-main.c (main): Take optional specific test
3150 * dbus/dbus-test.c (run_test): New function, runs a test function
3151 with no data directory.
3152 (run_data_test): Like above, but takes data directory.
3153 (dbus_internal_do_not_use_run_tests): Take
3154 specific test argument. Replace lots of cut n' paste code
3155 with run_test and run_data_test.
3157 * dbus/dbus-test.h: Update prototype for
3158 dbus_internal_do_not_use_run_tests.
3160 2005-02-20 Havoc Pennington <hp@redhat.com>
3162 Fix bugs reported by Daniel P. Berrange
3164 * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
3165 (protected_change_watch): new function
3166 (_dbus_server_toggle_watch, _dbus_server_remove_watch)
3167 (_dbus_server_add_watch): change to work like the
3168 dbus-connection.c equivalents; like those, probably kind of
3169 busted, but should at least mostly work for now
3170 (dbus_server_disconnect): drop the lock if we were already
3171 disconnected, patch from Daniel P. Berrange
3173 * dbus/dbus-server.c (_dbus_server_toggle_timeout)
3174 (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
3177 * doc/TODO: todo about unscrewing this mess
3179 2005-02-19 Colin Walters <walters@verbum.org>
3181 * glib/dbus-binding-tool-glib.c
3182 (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
3184 * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
3185 as errno.h and sys/stat.h.
3186 (lose): New function, prints error with
3188 (lose_gerror): Similar, but takes GError for message.
3189 (main): Add --output argument to specify output file to write to,
3190 instead of always printing to stdout. In this mode, determine
3191 timestamps on source files to see whether any are newer than the
3192 target file. If not, exit. Also convert a number of error
3193 messages to use lose (since it's shorter), and switch to using
3194 g_io_channel_shutdown.
3196 2005-02-19 Havoc Pennington <hp@redhat.com>
3198 * glib/dbus-gobject.c
3199 (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
3201 * glib/dbus-glib.c: fix doxygen warnings
3203 * glib/dbus-gparser.c (parse_annotation): error if an annotation
3204 is found on an <arg>
3206 2005-02-17 Colin Walters <walters@verbum.org>
3208 * glib/dbus-gobject.h: Don't export
3209 _dbus_glib_marshal_dbus_message_to_gvalue_array.
3211 * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
3212 (invoke_object_method): Handle it.
3214 * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
3217 2005-02-17 Colin Walters <walters@verbum.org>
3219 * bus/.cvsignore, doc/.cvsignore
3220 * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
3223 2005-02-17 Colin Walters <walters@verbum.org>
3225 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
3226 Rename to DBUS_SERVICE_DBUS.
3227 (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
3228 (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
3229 Change the value from "org.freedesktop.Local"
3230 to "org.freedesktop.DBus.Local".
3231 (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
3232 (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
3233 DBUS_INTERFACE_INTROSPECTABLE.
3234 Change the value from "org.freedesktop.Introspectable"
3235 to "org.freedesktop.DBus.Introspectable".
3236 (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
3237 DBUS_INTERFACE_PROPERTIES.
3238 Change the value from "org.freedesktop.Properties"
3239 to "org.freedesktop.DBus.Properties".
3240 (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
3241 DBUS_INTERFACE_PEER.
3242 Change the value from "org.freedesktop.Peer"
3243 to "org.freedesktop.DBus.Peer".
3244 (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
3245 DBUS_INTERFACE_LOCAL.
3246 Change the value from "org.freedesktop.Local"
3247 to "org.freedesktop.DBus.Local".
3249 All other users of those constants have been changed.
3251 * bus/driver.c (bus_driver_handle_introspect): Use constants.
3253 * glib/dbus-gobject.c (handle_introspect): Use constants.
3255 * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
3257 2005-02-17 Colin Walters <walters@verbum.org>
3259 * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
3260 (parse_node, parse_interface, parse_method, parse_signal)
3261 (parse_property, parse_annotation): Lose if we're currently in an
3263 (parse_annotation): New function.
3264 (parser_start_element, parser_end_element): Handle annotation.
3265 (parse_method, parse_interface): Remove support for c_name attribute,
3266 switch to annotations.
3268 * glib/dbus-gidl.h (interface_info_get_binding_names)
3269 (method_info_get_binding_names)
3270 (interface_info_get_binding_name, method_info_get_binding_name)
3271 (interface_info_set_binding_name, method_info_set_binding_name):
3273 (interface_info_get_annotations, method_info_get_annotations)
3274 (interface_info_get_annotation, method_info_get_annotation)
3275 (interface_info_add_annotation, method_info_add_annotation):
3278 * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
3280 (struct MethodInfo): Ditto.
3281 Straightfoward conversion of binding methods into annotation methods
3284 * glib/dbus-glib-tool.c (pretty_print): Print annotations.
3286 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
3288 * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
3289 Use new annotation API.
3291 * doc/introspect.dtd: Fix a number of DTD syntax errors. Add
3294 * doc/dbus-specification.xml: Discuss introspection annotations,
3295 include list of well-known annotations.
3297 * test/glib/test-service-glib.xml: Make validate against new DTD.
3299 2005-02-17 Colin Walters <walters@verbum.org>
3301 This patch is based on initial work from
3302 Paul Kuliniewicz <kuliniew@purdue.edu>.
3304 * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
3305 initialization of GValue from dbus type to here.
3306 (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
3307 for the "glib-genmarshal" program from a DBus type.
3308 (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
3309 into the C name for it we use in the glib bindings.
3310 (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
3311 glib C type (not GValue).
3312 (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
3314 * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
3315 from dbus-gobject.c.
3317 * glib/dbus-gutils.h: Prototype it.
3319 * glib/dbus-gproxy.c: Include new dbus-gobject.h.
3320 (marshal_dbus_message_to_g_marshaller): Use new shared function
3321 dbus_glib_marshal_dbus_message_to_gvalue_array.
3323 * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
3324 Will be changed once we have annotations.
3326 * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
3327 GStaticRWLock. Callers updated.
3328 (wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
3329 (string_table_next): New function for iterating over zero-terminated
3331 (string_table_lookup): New function; retrieves specific entry in
3333 (get_method_data): New function; look up method data in object data chunk.
3334 (object_error_domain_prefix_from_object_info)
3335 (object_error_code_from_object_info): New functions, but not implemented yet.
3336 (method_interface_from_object_info): New function; retrieve interface name.
3337 (method_name_from_object_info): New function; retrieve method name.
3338 (method_arg_info_from_object_info): New function; retrieve argument data.
3339 (arg_iterate): New function; iterates over serialized argument data.
3340 (method_dir_signature_from_object_info): New function; returns a
3341 GString holding type signature for arguments for just one
3342 direction (input or output).
3343 (method_input_signature_from_object_info)
3344 (method_output_signature_from_object_info): New functions.
3345 (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
3346 converts dbus message arguments into a GValue array. Used for both
3347 signal handling and method invocation.
3348 (struct DBusGlibWriteIterfaceData): New utility structure.
3349 (write_interface): New function; generate introspection XML for
3351 (introspect_interfaces): New function; gathers all interface->methods,
3352 generates introspection XML for them.
3353 (handle_introspect): Invoke introspect_interfaces.
3354 (get_object_property): Be sure to zero-initalize stack-allocated GValue.
3355 (lookup_object_and_method): New function; examines an incoming message
3356 and attempts to match it up (via interface, method name, and argument
3357 signature) with a known object and method.
3358 (gerror_domaincode_to_dbus_error_name): New function; converts a
3359 GError domain and code into a DBus error name. Needs GError data
3360 added to object introspection to work well.
3361 (gerror_to_dbus_error_message): Creates a DBusMessage error return from
3363 (invoke_object_method): New function to invoke an object method
3364 looked up via lookup_object_and_method. Parses the incoming
3365 message, turns it into a GValue array, then invokes the marshaller
3366 specified in the DBusGMethodInfo. Creates a new message with
3367 either return values or error message as appropriate.
3368 (gobject_message_function): Invoke lookup_object_and_method and
3369 invoke_object_method.
3371 * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
3372 (enum DBusBindingOutputMode): New enum for binding output modes.
3373 (pretty_print): Print binding names.
3374 (dbus_binding_tool_error_quark): GError bits.
3375 (version): Fix typo.
3376 (main): Create GIOChannel for output. Parse new --mode argument,
3377 possible values are "pretty-print", "glib-server", "glib-client".
3378 Use mode to invoke appropriate function.
3380 * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
3382 * glib/dbus-glib-tool.h: New header, just includes GError bits
3385 * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
3386 maps binding style to name.
3387 (struct MethodInfo): Ditto.
3388 (get_hash_keys, get_hash_key): Utility function, returns keys for
3390 (interface_info_new, method_info_new): Initialize bindings.
3391 (interface_info_unref, method_info_unref): Destroy bindings.
3392 (method_info_get_binding_names, method_info_get_binding_name)
3393 (interface_info_get_binding_names, interface_info_get_binding_name):
3394 Functions for retrieving binding names.
3395 (method_info_set_binding_name, interface_info_set_binding_name):
3396 Functions for setting binding names.
3398 * glib/dbus-binding-tool-glib.h: New file, has prototypes
3399 for glib binding generation.
3401 * glib/dbus-binding-tool-glib.c: New file, implements server-side
3402 and client-side glib glue generation.
3404 * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
3405 dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
3408 * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
3409 of using GClosureMarshal directly.
3410 (struct DBusGObjectInfo): Add n_infos member.
3412 * test/glib/test-service-glib.xml: New file; contains introspection data
3413 for MyTestObject used in test-service-glib.c.
3415 * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
3416 (my_object_do_nothing, my_object_increment, my_object_throw_error)
3417 (my_object_uppercase, my_object_many_args): New test methods.
3418 (main): Use dbus_g_object_class_install_info to include generated object
3421 * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
3422 as well as client-side bindings.
3424 * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
3425 (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
3426 using both the dbus_gproxy stuff directly as well as the generated bindings.
3428 2005-02-15 Havoc Pennington <hp@redhat.com>
3430 * dbus/dbus-connection.c (dbus_connection_dispatch): always
3431 complete a pending call, don't run filters first.
3433 * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
3434 dbus_pending_call_steal_reply
3436 * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
3437 _dbus_connection_block_pending_call
3438 (dbus_pending_call_get_reply): change to steal_reply and return a
3441 * dbus/dbus-connection.c
3442 (dbus_connection_send_with_reply_and_block): port to work in terms
3444 (_dbus_connection_block_pending_call): replace block_for_reply
3447 2005-02-14 Havoc Pennington <hp@redhat.com>
3449 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
3450 properly handle looking up group information by name; fix
3453 2005-02-13 Havoc Pennington <hp@redhat.com>
3455 * dbus/dbus-connection.c (dbus_connection_return_message)
3456 (dbus_connection_borrow_message): hold dispatch lock while message
3458 (_dbus_connection_block_for_reply): hold dispatch lock while we
3459 block for the reply, so nobody steals our reply
3460 (dbus_connection_pop_message): hold the dispatch lock while we
3463 2005-02-13 Havoc Pennington <hp@redhat.com>
3465 * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
3466 (_dbus_connection_release_dispatch)
3467 (_dbus_connection_acquire_io_path)
3468 (_dbus_connection_release_io_path): make the mutex and condvar
3469 control access to the "acquired" flag. Drop the connection lock
3470 while waiting on the condvar. Hopefully these are baby steps in
3471 roughly the right direction.
3473 2005-02-13 Havoc Pennington <hp@redhat.com>
3475 * dbus/dbus-connection.c: use separate mutexes for the condition
3476 variables; this is some kind of baseline for sanity, but the
3477 condition variables still aren't used correctly afaict
3479 2005-02-13 Havoc Pennington <hp@redhat.com>
3481 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3484 * dbus/dbus-connection.c
3485 (_dbus_connection_detach_pending_call_unlocked): add this
3487 Initial semi-correct pass through to fix thread locking; there are
3488 still some issues with the condition variable paths I'm pretty
3491 * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
3494 * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
3495 rename to add _unlocked
3496 (struct DBusConnection): move "dispatch_acquired" and
3497 "io_path_acquired" to use only one bit each.
3498 (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
3499 (dbus_connection_set_watch_functions): hacky fix to reentrancy
3500 (_dbus_connection_add_watch, _dbus_connection_remove_watch)
3501 (_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
3502 (_dbus_connection_remove_timeout)
3503 (_dbus_connection_toggle_timeout): drop lock when calling out to
3504 user functions; done in a hacky/bad way.
3505 (_dbus_connection_send_and_unlock): add a missing unlock
3506 (_dbus_connection_block_for_reply): add a missing unlock
3508 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
3509 drop lock in a hacky probably unsafe way to call out to user
3512 2005-02-12 Havoc Pennington <hp@redhat.com>
3514 * tools/dbus-tree-view.c (info_set_func_text): display more
3517 * bus/driver.c (bus_driver_handle_list_services): list the bus
3520 * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
3522 * glib/dbus-gidl.c (signal_info_get_n_args): new function
3523 (method_info_get_n_args): new function
3525 2005-02-12 Havoc Pennington <hp@redhat.com>
3527 * bus/driver.c (bus_driver_handle_introspect): add introspection
3530 2005-02-12 Havoc Pennington <hp@redhat.com>
3532 * bus/driver.c: put the signature of each bus driver method in the
3533 table of handlers and check it on incoming calls; this isn't
3534 really useful, but going to add introspect support in a minute.
3536 2005-02-11 Joe Shaw <joeshaw@novell.com>
3538 * mono/Connection.cs: The unpredictability of finalizers in mono
3539 prevents us from deterministically disconnecting the filters from
3540 the Service class's finalizer, so move tracking of filters and
3541 matches here. Add API for that.
3543 * mono/Service.cs: Remove the code, add code which calls the
3544 methods now on the Connection class.
3546 2005-02-11 John (J5) Palmieri <johnp@redhat.com>
3548 * python/dbus.py (class Sender): added to support dbus signals better
3549 (Bus::add_signal_receiver): added expand_args parameter which defaults
3550 to True. When expand args is True the signal handler will pass the
3551 message arguments as parameters to the signal handler. If False
3552 revert to previous behavior where the signal handler must get the
3553 argument list from the message. This is to help port applications
3554 like HAL that have a tendancy to send variable length argument lists.
3555 self._match_rule_to_receivers is now a dict of dicts.
3556 (Bus::remove_signal_receiver): pop handler off the dict intead of
3557 removing it from a list
3558 (Bus::_signal_func): change signal handlers so that interface,
3559 signal_name, service, path and message are packed into a Sender
3560 object and that is passed to the handler. If expand_args is True
3561 extract the args list from the message and append it to the parameter
3564 * python/dbus_bindings.pyx.in (class Signature): added to support
3566 (MessageIter::__init__): changed iteration limit to match D-BUS
3567 (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY,
3568 STRUCT and VARIENT type support
3569 (MessageIter::python_value_to_dbus_sig): made recursive to support
3571 (MessageIter::append*): added Signature, dict, tuple
3574 * python/examples/example-client.py: added examples of getting tuples
3577 * python/examples/example-service.py: added examples of sending tuples
3580 * python/examples/example-signal-recipient.py: Fixed to handle new
3581 signal callback format
3583 2005-02-10 Havoc Pennington <hp@redhat.com>
3585 * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
3586 (call dbus_g_proxy_add_signal)
3588 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
3590 (_dbus_server_new_for_domain_socket): escape the path
3592 * dbus/dbus-address.c (dbus_address_escape_value): new
3593 (dbus_address_unescape_value): new
3594 (dbus_parse_address): unescape values
3596 * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
3598 * doc/dbus-specification.xml: explain how to escape values in
3601 2005-02-10 Havoc Pennington <hp@redhat.com>
3603 * dbus/dbus-message-factory.c (generate_special): modify test to
3604 avoid using a non-basic dict key
3606 * dbus/dbus-marshal-validate-util.c: add test for the below
3608 * doc/dbus-specification.xml: require that dict keys are a basic
3611 * dbus/dbus-marshal-validate.c
3612 (_dbus_validate_signature_with_reason): require that dict key is a
3615 2005-02-10 Havoc Pennington <hp@redhat.com>
3617 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3618 change to be _and_unlock instead of _unlocked
3620 * dbus/dbus-connection.c
3621 (_dbus_connection_send_preallocated_unlocked_no_update): rename to
3622 have no_update so we can find this bug quickly in future
3624 2005-02-10 Havoc Pennington <hp@redhat.com>
3626 * dbus/dbus-message-util.c (verify_test_message): tests for string
3629 * dbus/dbus-message.c (dbus_message_append_args_valist): add
3630 support for arrays of string/signature/path
3632 2005-02-10 Joe Shaw <joeshaw@novell.com>
3634 * dbus/dbus-connection.c
3635 (_dbus_connection_queue_received_message_link,
3636 _dbus_connection_message_sent): Add the path to
3638 (_dbus_connection_send_preallocated_and_unlock): Added. Calls
3639 _dbus_connection_send_preallocated_unlocked(), updated the
3640 dispatch status, and unlocks. Fixes a bug where certain
3641 situations (like a broken pipe) could cause a Disconnect message
3642 to not be sent, tricking the bus into thinking a service was still
3643 there when the process had quit.
3644 (_dbus_connection_send_preallocated): Call
3645 _dbus_connection_send_preallocated_and_unlock().
3646 (_dbus_connection_send_and_unlock): Added. Calls
3647 _dbus_connection_send_preallocated_and_unlock().
3648 (dbus_connection_send): Call _dbus_connection_send_and_unlock().
3649 (dbus_connection_send_with_reply): Update the dispatch status and
3652 * mono/Service.cs (~Service): Added. Removes the filter so that
3653 we don't get unmanaged code calling back into a GCed delegate.
3654 (RemoveFilter); Added.
3656 2005-02-09 John (J5) Palmieri <johnp@redhat.com>
3658 * dbus/dbus-message.c (dbus_message_iter_open_container):
3659 - Removed check for iterator type being an array because
3660 get_arg_type does not work with writer iterators
3661 - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
3663 2005-02-07 Havoc Pennington <hp@redhat.com>
3665 * doc/dbus-specification.xml: some more language cleanups; add
3666 stuff about how to deal with invalid protocol and extension
3667 points; add _ to allowed chars in auth commands; add EXTENSION_
3670 2005-02-06 Havoc Pennington <hp@redhat.com>
3672 * s/expected/required/ in a couple places for clarity
3674 2005-02-07 Colin Walters <walters@verbum.org>
3676 * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
3677 sender or proposed_recipient.
3679 2005-02-06 Havoc Pennington <hp@redhat.com>
3681 * dbus/dbus-message-factory.c (generate_special): more tests
3683 * dbus/dbus-marshal-validate.c (validate_body_helper): detect
3684 array length that exceeds the maximum
3686 2005-02-05 Havoc Pennington <hp@redhat.com>
3688 * dbus/dbus-message-factory.c (generate_special): more test cases,
3691 * dbus/dbus-marshal-validate.c (validate_body_helper): return the
3692 reason why a signature was invalid
3694 * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
3695 skip the length of the string before we look at it in validation
3697 * dbus/dbus-string-util.c (_dbus_string_test): add tests for
3700 * dbus/dbus-message.c (_dbus_message_loader_new): default
3701 max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
3703 2005-02-05 Havoc Pennington <hp@redhat.com>
3705 * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
3706 if the signature of a variant was empty
3707 (_dbus_validate_signature_with_reason): catch "(a)" (array inside
3708 struct with no element type)
3710 * dbus/dbus-message-factory.c (generate_uint32_changed): add more
3711 mangled messages to break things
3713 2005-02-04 Havoc Pennington <hp@redhat.com>
3715 * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
3716 g_quark_try_string() so it actually can return 0
3717 (dbus_g_proxy_connect_signal): ditto
3719 2005-02-04 Havoc Pennington <hp@redhat.com>
3721 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
3723 (tristring_from_message): assert cleanly on null path/interface
3724 (should not be possible though I decided later)
3725 (dbus_g_proxy_dispose): move proxy manager unregistration here
3726 (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
3727 g_return_if_fail() checks
3729 2005-02-04 Havoc Pennington <hp@redhat.com>
3731 * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
3733 * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
3734 (with some minor changes)
3736 * doc/dbus-specification.xml: add deprecated attribute to
3737 introspection format
3739 2005-01-31 Havoc Pennington <hp@redhat.com>
3741 * glib/dbus-gproxy.c: rewrite how signals work again, this time I
3742 think it's sort of right
3744 2005-01-30 Havoc Pennington <hp@redhat.com>
3746 * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
3748 2005-01-30 Havoc Pennington <hp@redhat.com>
3750 * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
3752 * autogen.sh: change to autotools 1.9
3754 * glib/dbus-gproxy.c: completely change how signals work
3755 (dbus_g_proxy_add_signal): new function to specify signature of a
3757 (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
3758 and g_warning if the incoming message has the wrong signature.
3760 2005-01-30 Havoc Pennington <hp@redhat.com>
3762 * tools/dbus-names-model.c (have_names_notify): fix this
3764 * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
3765 up the string array handling a bit
3767 2005-01-30 Havoc Pennington <hp@redhat.com>
3769 * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
3770 (dbus_g_pending_call_cancel): new function
3772 * dbus/dbus-glib.h: move GType decls for connection/message here;
3773 * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
3774 here, just kind of rationalizing how we handle all that
3776 * tools/dbus-names-model.c: new file for a tree model listing the
3779 * tools/dbus-tree-view.c (model_new): use proper typing on the
3782 2005-01-30 Havoc Pennington <hp@redhat.com>
3784 * glib/dbus-gmain.c: add a custom GSource back that just checks
3785 whether the message queue has anything in it; otherwise, there are
3786 cases where we won't see messages in the queue since there was no
3787 IO visible to the glib main loop
3789 * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
3790 increase default message timeout to 25 seconds
3792 2005-01-30 Havoc Pennington <hp@redhat.com>
3794 * test/glib/test-profile.c (no_bus_stop_server): remove the
3795 warning about the g_warning that I just fixed
3797 * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
3798 custom source, seems to be a lot easier to understand and work
3801 2005-01-30 Havoc Pennington <hp@redhat.com>
3803 I think this main loop thing is conceptually broken, but here are
3804 some band aids. I'll maybe rewrite it in a minute.
3806 * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
3807 custom GSource, so don't pass it in; confusing
3808 (gsource_server_finalize, gsource_connection_finalize): add
3809 finalize handlers that remove all the watches.
3811 2005-01-30 Havoc Pennington <hp@redhat.com>
3813 * glib/dbus-gobject.c (introspect_properties): fix the XML
3816 * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
3817 which effectively detects the use of freed messages
3819 * glib/dbus-gobject.c (handle_introspect): modify and return the
3820 reply message instead of the incoming message
3822 * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
3823 gee, maybe it should SEND THE XML instead of just making a string
3824 and freeing it again ;-)
3826 * tools/dbus-print-message.c (print_message): improve printing of
3829 * configure.in: add debug-glib.service to the output
3831 2005-01-30 Havoc Pennington <hp@redhat.com>
3833 dbus-viewer introspected and displayed the bus driver
3835 * dbus/dbus-object-tree.c
3836 (object_tree_test_iteration): add tests for a handler registered on "/"
3838 * dbus/dbus-object-tree.c
3839 (_dbus_decompose_path): fix to handle path "/" properly
3840 (run_decompose_tests): add tests for path decomposition
3842 * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
3845 * glib/dbus-gobject.c (handle_introspect): fix quotes
3847 * test/glib/run-test.sh: support launching the bus, then running
3850 * test/glib/test-service-glib.c (main): put in a trivial gobject
3851 subclass and register it on the connection
3853 * bus/driver.c (bus_driver_handle_introspect): implement
3854 introspection of the bus driver service
3856 * dbus/dbus-protocol.h: add #defines for the XML namespace,
3857 identifiers, doctype decl
3859 * bus/driver.c (bus_driver_handle_get_service_owner): handle
3860 attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
3861 returning the service unchanged.
3862 (bus_driver_handle_message): remove old check for reply_serial in
3863 method calls, now the message type deals with that
3864 (bus_driver_handle_message): handle NULL interface
3866 * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
3868 * glib/dbus-gloader-expat.c (description_load_from_string): allow
3871 * tools/dbus-viewer.c: add support for introspecting a service on
3874 * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
3875 (dbus_g_pending_call_unref): add
3877 2005-01-29 Havoc Pennington <hp@redhat.com>
3879 * tools/dbus-tree-view.c: add support for displaying properties.
3880 (run dbus-viewer with an introspect xml file as arg, then resize
3881 the window so the tree elements show up, not sure what that is)
3883 * glib/dbus-gobject.c (handle_introspect): return
3884 org.freedesktop.Properties and org.freedesktop.Introspectable
3885 interfaces when we are introspected.
3887 * doc/dbus-specification.xml: allow empty interface name when
3890 2005-01-29 Havoc Pennington <hp@redhat.com>
3892 * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
3893 though it uses glib, it could be extended for any binding in
3896 * glib/dbus-gobject.c (gobject_message_function): change to the
3897 new way properties work
3899 * dbus/dbus-protocol.h: add the new interfaces
3901 * doc/dbus-specification.xml: document the introspection format,
3902 Introspectable interface, and add an org.freedesktop.Properties
3905 * glib/dbus-gparser.c: add support for a <property> element
3907 * glib/dbus-gidl.c: add PropertyInfo
3909 * glib/dbus-gobject.c (handle_introspect): put the outermost
3910 <node> outside the signal and property descriptions.
3911 (introspect_properties): export properties as <property> rather
3912 than as method calls
3914 2005-01-28 Havoc Pennington <hp@redhat.com>
3916 * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
3917 related to authentication protocol
3919 2005-01-28 John (J5) Palmieri <johnp@redhat.com>
3921 * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
3922 - BUS_ACTIVATION -> BUS_STARTER
3923 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
3924 - class MessageIter (__init__): Added recursion checking
3925 so we throw a nice error instead of just disconnecting from the
3927 (get): Added arg_type parameter for recursion.
3928 Removed the nil type
3929 Added signiture type placeholder (not implemented)
3930 Added struct type placeholder (not implemented)
3931 Added varient type placeholder (not implemented)
3932 Commented out dict type for now
3933 (get_element_type): renamed from get_array_type
3934 (get_*): changed to use the dbus_message_iter_get_basic API
3935 (get_*_array): removed in favor of recursive get_array method
3936 (get_array): new recursive method which calls get to marshal
3937 the elements of the array
3938 (value_to_dbus_sig): New method returns the corrasponding
3939 dbus signiture to a python value
3940 (append): Comment out dict handling for now
3941 Handle lists with the new recursive API
3942 Comment out None handling for now
3943 (append_nil): removed
3944 (append_*): changed to use dbus_message_iter_append_basic API
3945 (append_*_array): removed in favor of recursive append_array
3947 (__str__): Make it easier to print out recursive iterators
3949 - class Message (__str__): moved type inspection to the
3950 MessageIter class' __str__ method
3951 (get_iter): Added an append parameter wich defaults to False
3952 If True use the new API's to create an append iterator
3954 * python/dbus.py: Update to use new bindings API
3955 - TYPE_ACTIVATION -> TYPE_STARTER
3956 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
3957 - class ActivationBus -> class StarterBus
3958 - class RemoteObject (__call__): get an append iterator
3959 - (_dispatch_dbus_method_call): get an append iterator
3960 - class Object (emit_signal): get an append iterator
3962 * python/examples/: Fixed up the examples to work with the new API
3964 2005-01-28 Joe Shaw <joeshaw@novell.com>
3966 * configure.in: Bump version up to 0.30.
3968 * HACKING: Add a release item to bump the version number up after
3971 2005-01-28 Havoc Pennington <hp@redhat.com>
3973 * doc/dbus-specification.xml: update to describe 16-bit types and
3976 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
3979 * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
3982 * dbus/dbus-marshal-recursive.c: implement
3984 2005-01-27 Havoc Pennington <hp@redhat.com>
3986 * dbus/dbus-arch-deps.h.in: add 16/32-bit types
3988 * configure.in: find the right type for 16 and 32 bit ints as well
3991 * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
3992 the 16-bit types so people don't have to stuff them in 32-bit or
3995 2005-01-27 Havoc Pennington <hp@redhat.com>
3997 * dbus/dbus-message.c: byteswap the message if you init an
3998 iterator to read/write from it
4000 * dbus/dbus-marshal-byteswap.c: new file implementing
4001 _dbus_marshal_byteswap()
4003 * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
4005 2005-01-26 Havoc Pennington <hp@redhat.com>
4007 * dbus/dbus-marshal-validate-util.c: break this out (and fix
4008 build, apparently - nobody noticed?)
4010 2005-01-26 Havoc Pennington <hp@redhat.com>
4012 * dbus/dbus-marshal-recursive.h: remove todo comment
4014 2005-01-25 Joe Shaw <joeshaw@novell.com>
4016 * Land the mono binding changes to conform to the new APIs.
4018 * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
4019 DBusType/Dict.cs, and DBusType/Nil.cs from the build.
4021 * mono/Arguments.cs (GetCodeAsString): Added. Returns the dbus
4022 type code as a string.
4023 (InitAppending): Rename dbus_message_append_iter_init() to
4024 dbus_message_iter_init_append().
4026 * mono/BusDriver.cs: Rename ServiceEventHandler to
4027 NameOwnerChangedHandler. Rename GetServiceOwner to GetOwner.
4028 Rename ServiceOwnerChanged to NameOwnerChanged.
4030 * mono/Connection.cs: Rename BaseService to UniqueName, and the
4033 * mono/Custom.cs: Removed. The CUSTOM type has been removed.
4035 * mono/Service.cs: Rename Exists to HasOwner, internally rename
4036 dbus_bus_acquire_service() to dbus_bus_request_name().
4038 * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
4039 of Type.UnderlyingSystemType to get the correct element type for
4041 (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
4042 dbus_message_get_{element|arg}_type() instead of
4043 dbus_message_iter_init_array_iterator().
4044 (Append): Replace dbus_message_iter_append_array() with
4045 dbus_message_iter_open_container() and
4046 dbus_message_iter_close_container().
4048 * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed. These
4049 types have been removed.
4051 * mono/DBusType/*.cs: Replace calls of
4052 dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
4053 but specify the type in the DllImport extern declaration. Ditto
4054 for dbus_message_iter_append_[type]() ->
4055 dbus_message_iter_append_basic().
4057 * mono/example/BusListener.cs: Update for ServiceEventHandler ->
4058 NameOwnerChangedHandler.
4060 2005-01-25 John (J5) Palmieri <johnp@redhat.com>
4062 * python/dbus_bindings.pyx.in: Rename of methods and bindings
4063 - get_base_service -> get_unique_name
4064 - bus_get_base_service -> bus_get_unique_name
4065 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
4066 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS
4067 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
4068 - bus_activate_service -> bus_start_service_by_name
4069 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
4070 - bus_acquire_service -> bus_request_name
4071 - dbus_bus_acquire_service -> dbus_bus_request_name
4072 - bus_service_exists -> bus_name_has_owner
4073 - dbus_bus_service_exists -> dbus_bus_name_has_owner
4075 * python/dbus.py: Rename of methods
4076 - activate_service -> start_service_by_name
4077 - bus_acquire_service -> bus_request_name
4078 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS
4079 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
4082 2005-01-24 Joe Shaw <joeshaw@novell.com>
4084 * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
4085 signature for the method that can't be found.
4087 * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
4088 the message has any arguments, we need to call
4089 _dbus_type_reader_get_current_type(), not
4090 _dbus_type_reader_has_next().
4092 2005-01-24 Havoc Pennington <hp@redhat.com>
4094 * dbus/dbus-message-factory.c: more testing of message validation
4096 * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
4099 2005-01-23 Havoc Pennington <hp@redhat.com>
4101 * dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
4102 get this all working, not many tests in the framework yet though
4104 2005-01-22 Havoc Pennington <hp@redhat.com>
4106 * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
4107 tutorial, based on work from David Wheeler.
4109 2005-01-21 Havoc Pennington <hp@redhat.com>
4111 * dbus/dbus-bus.c: add more return_if_fail checks
4113 * dbus/dbus-message.c (load_message): have the "no validation"
4114 mode (have to edit the code to toggle the mode for now though)
4116 * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
4117 skips all validation; I want to use this at least for benchmark
4118 baseline, I'm not sure if it should be a publicly-available switch.
4120 2005-01-21 Havoc Pennington <hp@redhat.com>
4122 * glib/dbus-gmain.c: don't put the GLib bindings in the same
4123 toplevel doxygen group as the low-level API stuff
4125 * dbus/dbus.h: note that libdbus is the low-level API
4127 2005-01-20 Havoc Pennington <hp@redhat.com>
4129 * update-dbus-docs.sh: script to update docs on the web site, only
4130 works for me though. neener.
4132 2005-01-20 Havoc Pennington <hp@redhat.com>
4134 * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
4135 code can reveal bugs in it
4137 2005-01-20 Havoc Pennington <hp@redhat.com>
4139 * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
4140 select() version, patches from Tor Lillqvist
4142 2005-01-20 Havoc Pennington <hp@redhat.com>
4144 * doc/dbus-tutorial.xml: replace > with >
4146 * bus/services.c (bus_registry_acquire_service): validate the name
4147 and return a better error if it's no good.
4149 * doc/dbus-specification.xml: note NO_AUTO_START change
4151 * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
4152 from AUTO_START, we're toggling the default
4154 * bus/dispatch.c: adapt the tests to change of auto-start default
4156 2005-01-18 Havoc Pennington <hp@redhat.com>
4158 * rename dbus-daemon-1 to dbus-daemon throughout
4160 2005-01-18 Havoc Pennington <hp@redhat.com>
4162 * Throughout, grand renaming to strip out the use of "service",
4163 just say "name" instead (or "bus name" when ambiguous). Did not
4164 change the internal code of the message bus itself, only the
4165 programmer-facing API and messages.
4167 * doc/dbus-specification.xml: further update the message bus section
4169 * bus/config-parser.c (all_are_equiv): fix bug using freed string
4172 2005-01-17 Havoc Pennington <hp@redhat.com>
4174 * dbus/dbus-types.h: remove 16-bit types since we don't use them
4177 * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
4178 "invalid name character" not only non-ASCII
4180 * doc/dbus-specification.xml: further update spec, message bus
4181 parts are still out-of-date but the marshaling etc. stuff is now
4184 2005-01-17 Havoc Pennington <hp@redhat.com>
4186 * doc/dbus-specification.xml: partially update spec
4188 2005-01-17 Havoc Pennington <hp@redhat.com>
4190 * Throughout, align variant bodies according to the contained
4191 type, rather than always to 8. Should save a fair bit of space in
4194 * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
4195 fix handling of case where p == end
4197 * doc/TODO: remove the dbus_bool_t item and variant alignment items
4199 2005-01-17 Havoc Pennington <hp@redhat.com>
4201 * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
4203 * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
4204 of an 8-bit type. Now dbus_bool_t is the type to use whenever you
4205 are marshaling/unmarshaling a boolean.
4207 2005-01-16 Havoc Pennington <hp@redhat.com>
4209 This is about it on what can be disabled/deleted from libdbus
4210 easily, back below 150K anyhow. Deeper cuts are more work than
4211 just turning the code off as I've done here.
4213 * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
4214 signed int convenience funcs
4216 * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
4219 * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
4220 things out of libdbus
4222 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
4224 * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
4225 tests-enabled-only, though it should probably be deleted)
4227 * dbus/dbus-message-util.c: same stuff
4229 * dbus/dbus-auth-util.c: same stuff
4231 2005-01-16 Havoc Pennington <hp@redhat.com>
4233 * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
4235 * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
4236 way for stripping down dbus-userdb.c stuff included in libdbus.
4237 Rename _dbus_parse_uid for consistency.
4239 2005-01-16 Havoc Pennington <hp@redhat.com>
4241 * dbus/dbus-internals.c (_dbus_real_assert): print the function
4242 name the assertion failed in
4244 * dbus/dbus-internals.h (_dbus_return_if_fail)
4245 (_dbus_return_val_if_fail): assert that the name of the function
4246 containing the check doesn't start with '_', since we only want to
4247 use checks on public functions
4249 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
4250 checks to assertions
4252 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
4253 change checks to asserts for private function
4255 * dbus/dbus-message.c (_dbus_message_set_serial): checks
4256 to asserts for private function
4258 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
4259 broken assertion that was breaking make check
4260 (_dbus_type_reader_array_is_empty): remove this rather than fix
4261 it, was only used in assertions
4263 2005-01-16 Havoc Pennington <hp@redhat.com>
4265 * test/unused-code-gc.py: hacky script to find code that's used
4266 only by the bus (not libdbus) or used only by tests or not used at
4267 all. It has some false alarms, but looks like we can clean up a
4268 lot of size from libdbus.
4270 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
4271 dbus/Makefile.am: initially move 10K of binary size out of libdbus
4273 2005-01-16 Havoc Pennington <hp@redhat.com>
4275 * Add and fix docs according to Doxygen warnings throughout
4278 * dbus/dbus-marshal-recursive.c
4279 (_dbus_type_reader_array_is_empty): change this to just call
4280 array_reader_get_array_len() and make it static
4282 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
4284 (dbus_message_iter_init_append): rename from append_iter_init
4286 * dbus/dbus-marshal-recursive.c
4287 (_dbus_type_reader_get_element_type): rename from
4288 _dbus_type_reader_get_array_type
4290 2005-01-15 Havoc Pennington <hp@redhat.com>
4292 * test/glib/test-profile.c (with_bus_server_filter): fix crash
4294 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
4295 when DBUS_DISABLE_ASSERT
4296 (_dbus_marshal_set_basic): be sure we align for the string length
4298 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
4301 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
4302 inline macro version
4303 (_dbus_string_set_byte): provide inline macro version
4305 2005-01-15 Havoc Pennington <hp@redhat.com>
4307 * Land the new message args API and type system.
4309 This patch is huge, but the public API change is not
4310 really large. The set of D-BUS types has changed somewhat,
4311 and the arg "getters" are more geared toward language bindings;
4312 they don't make a copy, etc.
4314 There are also some known issues. See these emails for details
4316 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
4317 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
4319 * dbus/dbus-marshal-*: all the new stuff
4321 * dbus/dbus-message.c: basically rewritten
4323 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
4324 freed blocks to be all non-nul bytes so using freed memory is less
4325 likely to work right
4327 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
4328 DBUS_FAIL_MALLOC=N environment variable, so you can do
4329 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
4330 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
4333 * qt/message.cpp: port to the new message args API
4334 (operator<<): use str.utf8() rather than str.unicode()
4335 (pretty sure this is right from the Qt docs?)
4337 * glib/dbus-gvalue.c: port to the new message args API
4339 * bus/dispatch.c, bus/driver.c: port to the new message args API
4341 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
4342 "locked" flag to TRUE and align_offset to 0; I guess we never
4343 looked at these anyhow, but seems cleaner.
4345 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
4346 move allocation padding macro to this header; use it to implement
4347 (_DBUS_STRING_STATIC): ability to declare a static string.
4349 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
4350 change to return TRUE if the interface is not set.
4352 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
4353 to dbus-marshal-validate.[hc]
4355 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
4358 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
4359 to dbus-marshal-*.[hc]
4361 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
4362 function here from dbus-marshal.c
4364 2005-01-12 Joe Shaw <joeshaw@novell.com>
4366 * NEWS: Update for 0.23.
4368 * configure.in: Release 0.23.
4370 2005-01-12 Joe Shaw <joeshaw@novell.com>
4372 * mono/Makefile.am, mono/example/Makefile.am: Always build the
4373 dbus DLL with --debug. Clean up after the .mdb files this leaves
4376 * mono/doc/Makefile.am: Need to uninstall the docs on "make
4379 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
4380 is an enum, get the enum's underlying type. Another mono
4383 2005-01-11 Joe Shaw <joeshaw@novell.com>
4385 Patch from Sjoerd Simons <sjoerd@luon.net>
4387 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
4388 DESTDIR. It breaks stuff.
4390 2005-01-11 Joe Shaw <joeshaw@novell.com>
4392 Patch from Tambet Ingo <tambet@ximian.com>
4394 * mono/DBusType/Array.cs (Get): Get the underlying element type by
4395 calling type.GetElementType(). The code previously depended on
4396 broken Mono behavior, which was fixed in Mono 1.1.3.
4398 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
4399 Activator.CreateInstance() so that the class's constructor is
4400 called with the right parameters.
4402 2005-01-11 Joe Shaw <joeshaw@novell.com>
4404 Patch from Timo Teräs <ext-timo.teras@nokia.com>
4406 * dbus/dbus-connection.c
4407 (_dbus_connection_queue_received_message_link): Call
4408 _dbus_connection_remove_timeout() instead of the _locked()
4409 variant, since it's always called from
4410 _dbus_connection_handle_watch(), which handles the locking.
4411 Removed the _locked() variant since it's no longer used.
4413 2005-01-03 Havoc Pennington <hp@redhat.com>
4415 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
4418 2004-12-26 Havoc Pennington <hp@redhat.com>
4420 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
4422 2005-01-03 Havoc Pennington <hp@redhat.com>
4424 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
4427 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
4429 2005-01-02 Havoc Pennington <hp@redhat.com>
4431 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
4433 2005-01-01 Havoc Pennington <hp@redhat.com>
4435 * configure.in: add -Wfloat-equal
4437 2005-01-01 Havoc Pennington <hp@redhat.com>
4439 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
4440 for a variety of reasons '==' doesn't do this.
4442 2004-12-31 Havoc Pennington <hp@redhat.com>
4444 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
4445 I keep wishing I had
4447 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
4449 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
4451 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
4453 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
4454 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
4455 dbus-protocol.h. Because they are defines and not enums they are not
4458 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
4460 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
4461 dbus_bus_activate_service
4463 * python/dbus.py (Bus.activate_service): activate a service on the
4466 2004-12-24 Havoc Pennington <hp@redhat.com>
4468 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
4469 file format has also changed and I haven't adapted to that yet
4471 * Makefile.am: load .gcno files from latest gcc
4473 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
4474 * Patch from Rob Taylor <robtaylor@fastmail.fm>
4476 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
4479 * python/dbus.py (get_unix_user): Added binding to
4480 call dbus_bindings.bus_get_unix_user
4482 * python/extract.py: Modified the proto_pat regex to
4483 handle unsigned long
4485 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
4487 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
4488 better POSIX compliance.
4490 2004-12-19 Havoc Pennington <hp@redhat.com>
4492 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
4493 (_dbus_string_insert_8_aligned): new functions
4495 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
4497 2004-12-18 Havoc Pennington <hp@redhat.com>
4499 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
4502 * dbus/dbus-message.c: fix a comment, and add a still-unused
4503 not-implemented function
4505 * dbus/dbus-marshal.h: fix comment
4507 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
4509 2004-12-17 Joe Shaw <joeshaw@novell.com>
4511 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
4512 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
4513 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
4514 Type.UnderlyingSystemType to get the actual system type
4515 underneath. This code previously depended on the broken Mono
4516 behavior, which was fixed in 1.1.3.
4518 2004-11-27 Havoc Pennington <hp@redhat.com>
4520 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
4522 (_dbus_string_get_const_data): inline when asserts are disabled
4524 * dbus/dbus-message.c: record the _dbus_current_generation of
4525 creation so we can complain if dbus_shutdown() is used improperly.
4526 Do this only if checks are enabled.
4528 * dbus/dbus-connection.c: ditto
4530 2004-11-26 Havoc Pennington <hp@redhat.com>
4532 * test/glib/test-profile.c: add with_bus mode to profile echoes
4533 that go through the bus.
4535 * test/glib/run-test.sh: add ability to run test-profile
4537 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
4540 2004-11-26 Havoc Pennington <hp@redhat.com>
4542 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
4543 thing was implemented
4545 2004-11-26 Havoc Pennington <hp@redhat.com>
4547 * test/glib/test-profile.c: tweak a bit, add support for some
4548 made-up minimal malloc overhead with plain sockets, since in
4549 real life some sort of buffers are unavoidable thus we could
4550 count them in the theoretical best case
4552 2004-11-26 Havoc Pennington <hp@redhat.com>
4554 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
4555 where I was trying to cache one too many messages
4557 2004-11-26 Havoc Pennington <hp@redhat.com>
4559 * dbus/dbus-message.c: reimplement message cache as an array which
4560 makes the cache about twice as fast and saves maybe 1.5% overall
4562 2004-11-26 Havoc Pennington <hp@redhat.com>
4564 * dbus/dbus-threads.c (init_global_locks): forgot to put the
4565 message cache lock here
4567 2004-11-26 Havoc Pennington <hp@redhat.com>
4569 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
4570 the "char byte_order" next to each other to save 4 bytes
4571 (dbus_message_new_empty_header): reduce preallocation, since the
4572 message cache should achieve a similar effect
4573 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
4574 message cache that keeps a few DBusMessage around in a pool,
4575 another 8% speedup or so.
4577 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
4579 2004-11-25 Havoc Pennington <hp@redhat.com>
4581 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
4582 to write, without reading or blocking, try it before the poll()
4583 and skip the poll() if nothing remains to write. This is about a
4584 3% speedup in the echo client/server
4586 2004-11-25 Havoc Pennington <hp@redhat.com>
4588 The primary change here is to always write() once before adding
4589 the write watch, which gives us about a 10% performance increase.
4591 * dbus/dbus-transport-unix.c: a number of modifications to cope
4592 with removing messages_pending
4593 (check_write_watch): properly handle
4594 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
4595 messages_pending stuff
4596 (check_read_watch): properly handle WAITING_FOR_MEMORY and
4598 (unix_handle_watch): after writing, see if the write watch can be
4600 (unix_do_iteration): assert that write_watch/read_watch are
4601 non-NULL rather than testing that they aren't, since they
4602 aren't allowed to be NULL. check_write_watch() at the end so
4603 we add the watch if we did not finish writing (e.g. got EAGAIN)
4605 * dbus/dbus-transport-protected.h: remove messages_pending call,
4606 since it resulted in too much inefficient watch adding/removing;
4607 instead we now require that the transport user does an iteration
4608 after queueing outgoing messages, and after trying the first
4609 write() we add a write watch if we got EAGAIN or exceeded our
4610 max bytes to write per iteration setting
4612 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
4615 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
4616 freed and then accessed, valgrind flagged this bug, fix it
4618 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
4619 as the last valid field plus 1, where really it is equal to the
4620 last valid field. Corrects some message corruption issues.
4622 * dbus/dbus-mainloop.c: verbosity changes
4624 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
4625 instead of aborting in one of the test codepaths
4627 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
4628 caused not printing the pid ever again if a verbose was missing
4629 the newline at the end
4630 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
4632 * dbus/dbus-connection.c: verbosity changes;
4633 (dbus_connection_has_messages_to_send): new function
4634 (_dbus_connection_message_sent): no longer call transport->messages_pending
4635 (_dbus_connection_send_preallocated_unlocked): do one iteration to
4636 try to write() immediately, so we can avoid the write watch. This
4637 is the core purpose of this patchset
4638 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
4639 dump the outgoing message queue, so nobody will get confused
4640 trying to send them or thinking stuff is pending to be sent
4642 * bus/test.c: verbosity changes
4644 * bus/driver.c: verbosity/assertion changes
4646 * bus/dispatch.c: a bunch of little tweaks to get it working again
4647 because this patchset changes when/where you need to block.
4649 2004-11-23 Havoc Pennington <hp@redhat.com>
4651 * test/glib/test-profile.c: modify to accept a plain_sockets
4652 argument in which case it will bench plain sockets instead of
4653 libdbus, for comparison purposes.
4655 2004-11-22 Havoc Pennington <hp@redhat.com>
4657 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
4658 threads for more time, so sysprof can get a grip on it.
4660 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
4663 2004-11-13 Havoc Pennington <hp@redhat.com>
4665 * test/glib/test-profile.c: fix this thing up a bit
4667 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
4668 preallocation sizes by a fair bit; not sure if this will be an
4669 overall performance win or not, but it does reduce reallocs.
4671 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
4672 the test hack that forced constant realloc if asserts are
4673 disabled, so we can profile sanely. Sprinkle in some
4674 _DBUS_UNLIKELY() which are probably pointless, but before I
4675 noticed the real performance problem I put them in.
4676 (_dbus_string_validate_utf8): micro-optimize this thing a little
4677 bit, though callgrind says it didn't help; then special-case
4678 ascii, which did help a lot; then be sure we detect nul bytes as
4679 invalid, which is a bugfix.
4680 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
4681 superstition; use memset to nul the padding instead of a manual
4683 (_dbus_string_get_length): inline this as a
4684 macro; it showed up in the profile because it's used for loop
4687 2004-11-10 Colin Walters <walters@verbum.org>
4689 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
4692 2004-11-09 Colin Walters <walters@verbum.org>
4694 * dbus/dbus-string.c (_dbus_string_get_length): New
4695 function, writes DBusString to C buffer.
4697 * dbus/dbus-string.h: Prototype it.
4699 * dbus/dbus-message.c (dbus_message_type_to_string): New
4700 function, converts message type into C string.
4702 * dbus/dbus-message.h: Prototype it.
4704 * bus/selinux.c (bus_selinux_check): Take source pid,
4705 target pid, and audit data. Pass audit data to
4707 (log_audit_callback): New function, appends extra
4709 (bus_selinux_allows_acquire_service): Also take
4710 service name, add it to audit data.
4711 (bus_selinux_allows_send): Also take message
4712 type, interface, method member, error name,
4713 and destination, and add them to audit data.
4714 (log_cb): Initialize func_audit.
4716 * bus/selinux.h (bus_selinux_allows_acquire_service)
4717 (bus_selinux_allows_send): Update prototypes
4719 * bus/services.c (bus_registry_acquire_service): Pass
4720 service name to bus_selinux_allows_acquire_service.
4722 * bus/bus.c (bus_context_check_security_policy): Pass
4723 additional audit data. Move assignment of dest
4726 2004-11-07 Colin Walters <walters@verbum.org>
4728 * dbus/dbus-transport-unix.c (do_authentication): Always
4729 initialize auth_completed.
4731 2004-11-07 Colin Walters <walters@verbum.org>
4733 * bus/bus.c (load_config): Break into three
4734 separate functions: process_config_first_time_only,
4735 process_config_every_time, and process_config_postinit.
4736 (process_config_every_time): Move call of
4737 bus_registry_set_service_context_table into
4738 process_config_postinit.
4739 (process_config_postinit): New function, does
4740 any processing that needs to happen late
4741 in initialization (and also on reload).
4742 (bus_context_new): Instead of calling load_config,
4743 open config parser here and call process_config_first_time_only
4744 and process_config_every_time directly. Later, after
4745 we have forked but before changing UID,
4746 invoke bus_selinux_full_init, and then call
4747 process_config_postinit.
4748 (bus_context_reload_config): As in bus_context_new,
4749 load parse file inside here, and call process_config_every_time
4750 and process_config_postinit.
4752 * bus/services.h, bus/services.c
4753 (bus_registry_set_service_context_table): Rename
4754 from bus_registry_set_sid_table. Take string hash from config
4755 parser, and convert them here into SIDs.
4757 * bus/config-parser.c (struct BusConfigParser): Have
4758 config parser only store a mapping of service->context
4760 (merge_service_context_hash): New function.
4761 (merge_included): Merge context string hashes instead
4762 of using bus_selinux_id_table_union.
4763 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
4764 simply create a new string hash.
4765 (bus_config_parser_unref): Unref it.
4766 (start_selinux_child): Simply insert strings into hash,
4767 don't call bus_selinux_id_table_copy_over.
4769 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
4770 (bus_selinux_id_table_copy_over): Delete.
4772 2004-11-03 Colin Walters <walters@verbum.org>
4774 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
4777 2004-11-03 Colin Walters <walters@verbum.org>
4779 * bus/test-main.c (test_pre_hook): Fix test logic,
4780 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
4782 2004-11-02 Colin Walters <walters@redhat.com>
4784 * bus/selinux.c (bus_selinux_init): Split into two functions,
4785 bus_selinux_pre_init and bus_selinux_post_init.
4786 (bus_selinux_pre_init): Just determine whether SELinux is
4788 (bus_selinux_post_init): Do everything else.
4790 * bus/main.c (main): Call bus_selinux_pre_init before parsing
4791 config file, and bus_selinux_post_init after. This ensures that
4792 we don't lose the policyreload notification thread that
4793 bus_selinux_init created before forking previously.
4795 * bus/test-main.c (test_pre_hook): Update for split.
4797 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
4799 Patch from Johan Fischer <linux@fischaz.com>
4801 * mono/doc/Makefile.am (install-data-local): Added directory
4804 2004-10-29 Colin Walters <walters@redhat.com>
4806 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
4807 parameter for fd to write pid to.
4809 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
4811 * bus/bus.c (bus_context_new): Pass print_pid_fd
4812 to _dbus_become_daemon (bug #1720)
4814 2004-10-29 Colin Walters <walters@redhat.com>
4816 Patch from Ed Catmur <ed@catmur.co.uk>
4818 * mono/doc/Makefile.am (install-data-local): Handle
4821 2004-10-29 Colin Walters <walters@redhat.com>
4823 * bus/.cvsignore, qt/.cvsignore: Update.
4825 2004-10-29 Colin Walters <walters@redhat.com>
4827 Patch from Kristof Vansant <de_lupus@pandora.be>
4829 * configure.in: Detect Slackware.
4830 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
4831 * bus/rc.messagebus.in: New file.
4833 2004-10-29 Colin Walters <walters@redhat.com>
4835 * tools/dbus-monitor.c (filter_func): Return
4836 DBUS_HANDLER_RESULT_HANDLED in filter function
4838 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
4840 2004-10-29 Colin Walters <walters@redhat.com>
4842 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
4844 * bus/services.c (bus_registry_acquire_service):
4845 Correctly retrieve service name from DBusString
4848 2004-10-29 Colin Walters <walters@redhat.com>
4850 * dbus/dbus-glib.h: Update documentation to not
4851 refer to internal APIs.
4853 2004-10-27 Joe Shaw <joeshaw@novell.com>
4855 * mono/Arguments.cs (GetDBusTypeConstructor):
4856 type.UnderlyingSystemType will return "System.Byte" if you do it
4857 on "byte[]", which is not what we want. So check the type.IsArray
4858 property and use System.Array instead.
4860 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
4862 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
4863 the DBusUserInfo structure since this is passed into the function.
4864 This would cause a double free when the function that allocated
4865 the structure would try to free it when an error occured.
4867 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
4868 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
4869 for service activation to avoid 32bit/64bit parallel install issues
4871 2004-10-21 Colin Walters <walters@verbum.org>
4873 * AUTHORS: Fix my email address, the @gnu.org one
4874 has been bouncing for some time. Also add J5.
4876 2004-10-21 Colin Walters <walters@verbum.org>
4878 * dbus/dbus-transport-unix.c (do_authentication): Return
4879 authentication status to callers.
4880 (unix_handle_watch): If we completed authentication this round,
4881 don't do another read. Instead wait until the next iteration,
4882 after we've read any pending data in the auth buffer.
4883 (unix_do_iteration): Ditto.
4884 (unix_handle_watch): Updated for new do_authentication prototype.
4886 2004-10-18 Colin Walters <walters@verbum.org>
4888 * bus/selinux.c (bus_selinux_enabled): Handle
4889 --disable-selinux case.
4891 2004-10-18 Colin Walters <walters@verbum.org>
4893 * bus/selinux.h: Add bus_selinux_enabled.
4895 * bus/selinux.c (bus_selinux_enabled): Implement it.
4897 * bus/config-parser.c (struct include): Add
4898 if_selinux_enabled member.
4899 (start_busconfig_child): Parse if_selinux_enabled
4900 attribute for include.
4901 (bus_config_parser_content): Handle it.
4903 * bus/session.conf.in, bus/system.conf.in: Add
4904 inclusion of context mapping to default config files;
4905 conditional on SELinux being enabled.
4907 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
4909 * test/data/invalid-config-files/badselinux-1.conf,
4910 test/data/invalid-config-files/badselinux-2.conf:
4911 Test files for bad syntax.
4913 2004-10-17 Colin Walters <walters@verbum.org>
4915 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
4916 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
4917 format specifier mismatches.
4919 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
4921 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
4924 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
4925 pointer (bug #1540, Leonardo Boiko).
4927 2004-09-28 Jon Trowbridge <trow@ximian.com>
4929 * mono/BusDriver.cs: Changed BusDriver struct to remove
4930 the ServiceCreated and ServiceDeleted events and replace them
4931 with the new ServiceOwnerChanged event.
4933 * mono/example/BusListener.cs: Added a new example program,
4934 which listens for and reports any ServiceOwnerChanged events
4937 * mono/example/Makefile.am (DESTDIR): Build changes for the
4938 new BusListener.cs example.
4940 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
4942 * bus/signals.c (bus_match_rule_parse): validate the components of
4943 match rules (bug #1439).
4945 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
4947 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
4949 * doc/dbus-specification.xml: document ServiceOwnerChanged
4952 * bus/driver.c, bus/driver.h, bus/services.c: Use
4953 ServiceOwnerChanged signal instead of ServiceCreated and
4956 * bus/dispatch.c: update testcase for the new signal.
4958 2004-09-20 Jon Trowbridge <trow@ximian.com>
4960 Patch from Nat Friedman <nat@novell.com>
4962 * mono/Makefile.am: A number of small build fixes to allow "make
4963 distcheck" to succeed.
4965 * mono/example/Makefile.am: "make distcheck" fixes.
4967 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
4970 * test/Makefile.am: "make distcheck" fixes.
4972 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
4974 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
4976 * doc/busconfig.dtd: update the DTD for the at_console attribute.
4978 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
4979 messages after the first one (bug #1389).
4981 * bus/dispatch.c (check_double_hello_message): add a test case for
4982 the double hello message bug.
4983 (check_existent_service_activation): fix check of spawning error.
4985 2004-09-16 David Zeuthen <david@fubar.dk>
4987 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
4989 2004-09-12 David Zeuthen <david@fubar.dk>
4991 Patch from Kay Sievers <kay.sievers@vrfy.org>
4993 * bus/bus.c (bus_context_new):
4995 * bus/main.c (usage)
4997 Add commandline option --nofork to override configuration file
5000 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
5002 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
5003 compilers don't like it (bug #974).
5005 2004-09-04 Harald Fernengel <harry@kdevelop.org>
5007 * qt/connection.*: Applied patch by Jérôme Lodewyck
5008 <lodewyck@clipper.ens.fr> to integrate an existing
5009 connection into the Qt eventloop
5011 2004-08-30 Jon Trowbridge <trow@ximian.com>
5013 * mono/BusDriver.cs: Added. This is a class for interacting with
5014 the org.freedesktop.DBus service.
5016 * mono/Message.cs: Added a mechanism to expose the message that is
5017 currently being dispatched via the static Message.Current
5018 property. Added Message.Sender and Message.Destination
5021 * mono/Handler.cs: Expose the dispatched message via
5022 Message.Current when handling method calls.
5024 * mono/Service.cs: Expose the dispatched message via
5025 Message.Current when handling signal emissions.
5027 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
5028 Connection.BaseService property.
5030 2004-08-28 Havoc Pennington <hp@redhat.com>
5032 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
5034 More fixes from Steve Grubb
5036 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
5037 (_dbus_listen_tcp_socket): fix fd leak
5039 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
5040 EINTR to a bit lower in the code
5042 2004-08-26 Jon Trowbridge <trow@ximian.com>
5044 * bus/driver.c (bus_driver_handle_service_exists): Respond with
5045 TRUE if we are inquiring about the existence of the built-in
5046 org.freedesktop.DBus service.
5048 2004-08-25 John Palmieri <johnp@redhat.com>
5049 * bus/config-parser.c:
5050 (struct PolicyType): Add POLICY_CONSOLE
5051 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
5052 (start_busconfig_child): Sets up console element when
5053 <policy at_console=""> is encountered in a policy file
5054 (append_rule_from_element): Convert console elements to console
5058 (bus_policy_create_client_policy): Add console rules to the client
5059 policy based on if the client is at the console
5060 (bus_policy_append_console_rule): New function for adding a
5061 console rule to a policy
5062 (bus_policy_merge): Handle console rule merging
5064 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
5065 where we check for console user files
5067 * dbus/dbus-sysdeps.c:
5068 (_dbus_file_exists): New function which checks if the given
5070 (_dbus_user_at_console): New function which does the system
5071 specific process of checking if the user is at the console
5073 * dbus/dbus-userdb.c:
5074 (_dbus_is_console_user): New function converts a UID to user name
5075 and then calls the system specific _dbus_user_at_console to
5076 see if the user is at the console and therefor a console user
5078 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
5080 * bus/config-parser.c (set_limit):
5081 * bus/dbus-daemon-1.1.in:
5082 * test/data/valid-config-files/many-rules.conf: set the
5083 max_match_rules_per_connection limt from the config file.
5085 * doc/busconfig.dtd: update the DTD.
5087 * bus/driver.c: remove some unused variables.
5089 2004-08-24 Mikael Hallendal <micke@imendio.com>
5091 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
5092 it's been replaced by dbus_g_bus_get
5094 2004-08-23 Colin Walters <walters@redhat.com>
5096 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
5098 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
5100 * bus/selinux.c: Create a thread for policy reload notification.
5101 (bus_selinux_get_policy_root): Implement.
5103 * bus/config-parser.c (start_busconfig_child)
5104 (bus_config_parser_content): Support SELinux-root relative
5107 * configure.in <HAVE_SELINUX>: Add -lpthread.
5109 * bus/test-main.c (test_pre_hook, test_post_hook): New.
5110 (test_post_hook): Move memory checking into here.
5111 (test_pre_hook, test_post_hook): Move SELinux checks in
5112 here, but conditional on a DBUS_TEST_SELINUX environment
5113 variable. Unfortunately we can't run the SELinux checks
5114 as a normal user, since they won't have any permissions
5115 for /selinux. So this will have to be tested manually
5116 for now, until we have virtualization for most of
5119 2004-08-23 Havoc Pennington <hp@redhat.com>
5121 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
5122 drop supplementary groups, suggested by Steve Grubb
5124 2004-08-20 Colin Walters <walters@redhat.com>
5126 * bus/config-parser.c (start_busconfig_child): Remove some unused
5129 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
5132 2004-08-17 Joe Shaw <joeshaw@novell.com>
5134 * configure.in: If --enable-mono is passed in, if we can't find
5137 * mono/Makefile.am: Use /gacutil to install assemblies into the
5140 2004-08-12 Havoc Pennington <hp@redhat.com>
5142 * NEWS: update for 0.22
5144 * configure.in: release 0.22
5146 2004-08-11 Colin Walters <walters@redhat.com>
5148 * tools/dbus-send.c (main, usage): Add --reply-timeout
5151 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
5153 * bus/bus.c (process_config_first_time_only): get rid of an unused
5154 DBusError that was causing a memoy leak (bug #989).
5156 * dbus/dbus-keyring.c, dbus/dbus-message.c:
5157 fix compilation on Solaris/Forte C (bug #974)
5159 * bus/main.c (main): plug two minuscule memleaks.
5161 2004-08-10 Havoc Pennington <hp@redhat.com>
5163 * doc/dbus-tutorial.xml: add some more info on GLib bindings
5165 2004-08-09 Havoc Pennington <hp@redhat.com>
5167 * COPYING: switch to Academic Free License version 2.1 instead of
5168 2.0, to resolve complaints about patent termination clause.
5170 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
5172 * README: added documentation for the --enable-python
5175 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
5177 * bus/config-parser.c (bus_config_parser_new): fix an invalid
5178 _unref in the SELinux support.
5180 * doc/busconfig.dtd: update DTD for SELinux support.
5182 * bus/config-loader-libxml.c: fix error handler and parser
5183 initialisation/cleanup. OOM test now works with libxml2 HEAD.
5185 * configure.in: remove the warning about libxml2.
5187 * dbus/dbus-bus.c: silence doxygen warning.
5189 2004-07-31 Colin Walters <walters@redhat.com>
5191 * configure.in: Move #error in SELinux check to its own line.
5193 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
5195 * dbus/dbus-internals.h (_DBUS_SET_OOM):
5196 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
5199 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
5200 broken by the change in the _SET_OOM macros.
5202 2004-07-31 Colin Walters <walters@redhat.com>
5204 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
5207 2004-07-31 Colin Walters <walters@redhat.com>
5209 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
5210 to correctly detect DBUS__ACQUIRE_SVC. Also add an
5213 2004-07-24 Havoc Pennington <hp@redhat.com>
5215 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
5217 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
5220 * configure.in: add --enable-selinux
5222 * bus/policy.c (bus_policy_merge): add FIXME to a comment
5224 * bus/main.c (main): initialize and shut down selinux
5226 * bus/connection.c: store SELinux ID on each connection, to avoid
5227 repeated getting of the string context and converting it into
5230 * bus/bus.c (bus_context_get_policy): new accessor, though it
5232 (bus_context_check_security_policy): check whether the security
5233 context of sender connection can send to the security context of
5234 recipient connection
5236 * bus/config-parser.c: add parsing for <selinux> and <associate>
5238 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
5239 implement dbus_connection_get_unix_fd()
5241 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
5242 function, used by the selinux stuff
5244 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
5246 * bus/config-loader-libxml.c: complete the implementation of
5247 libxml backend for config file loader. Doesn't work with full OOM
5250 * configure.in: change error when selecting libxml into a warning.
5252 * test/data/invalid-config-files: add two non-well-formed XML
5255 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
5257 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
5258 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
5259 be necessary to read all the buffer. (bug #894)
5261 * bus/activation.c (bus_activation_activate_service): fix a
5262 potential assertion failure (bug #896). Small optimization in the
5263 case of auto-activation messages.
5265 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
5266 add test case for byte-through-vararg bug (#901). patch by Kimmo
5269 2004-07-28 Anders Carlsson <andersca@gnome.org>
5272 * python/dbus_bindings.pyx.in:
5273 Add dbus.init_gthreads (), allow emit_signal to pass
5274 arguments to the signal.
5276 2004-07-24 Havoc Pennington <hp@redhat.com>
5278 * AUTHORS: add some people, not really comprehensively, let me
5279 know if I missed you
5281 2004-07-24 Havoc Pennington <hp@redhat.com>
5283 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
5286 * test/Makefile.am (DIST_SUBDIRS): here also
5288 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
5290 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
5291 breaking build on Solaris, reported by Farhad Saberi on the ML.
5293 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
5294 va_arg invocation to account for integer promotion in the case of
5295 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
5297 * bus/services.c (bus_service_remove_owner): fix bug #902, use
5298 _dbus_list_get_first_link, not _dbus_list_get_first.
5300 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
5302 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
5303 handler functions so that the asserts in _dbus_object_subtree_unref
5306 * dbus/dbus-transport-unix.c (do_reading):
5307 _dbus_transport_queue_messages return value is of type
5308 dbus_bool_t, not DBusDispatchStatus.
5310 2004-07-19 David Zeuthen <david@fubar.dk>
5312 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
5315 (check_get_connection_unix_user): Debug says GetProperty; but the
5316 method is called GetConnectionUnixUser
5317 (check_get_connection_unix_process_id): New function
5318 (bus_dispatch_test): Actually call check_get_connection_unix_user();
5319 also call check_get_connection_unix_process_id()
5322 (bus_driver_handle_get_connection_unix_process_id): New function,
5323 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
5327 (handle_server_data_external_mech): Set pid from the credentials
5328 obtained from the socket
5330 * dbus/dbus-connection.c:
5331 (dbus_connection_get_unix_process_id): New function
5333 * dbus/dbus-connection.h:
5334 Add prototype for dbus_connection_get_unix_process_id
5336 * dbus/dbus-transport.c:
5337 (_dbus_transport_get_unix_process_id): New function
5339 * dbus/dbus-transport.h:
5340 Add prototype for _dbus_transport_get_unix_process_id
5342 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
5344 * dbus/dbus-message.c: Message counter fix, patch by Christian
5345 Hammond <chipx86@gnupdate.org>
5347 2004-07-18 Seth Nickell <seth@gnome.org>
5350 * python/dbus_bindings.pyx.in:
5351 * python/tests/test-client.py:
5353 Add dbus.ByteArray and dbus_bindings.ByteArray
5354 types so that byte streams can be passed back.
5356 Give jdahlin the heaps of credit that are so
5359 2004-07-12 Seth Nickell <seth@gnome.org>
5363 Add message argument to the default object_method_handler
5366 * python/dbus_bindings.pyx.in:
5368 Automatically return NIL when passed an empty list
5369 (we can't pass back a list since lists are typed
5370 and we don't have any idea what type the the client
5371 intended the list to be... :-( )
5373 2004-07-10 Seth Nickell <seth@gnome.org>
5375 * python/examples/Makefile.am:
5377 Fix distcheck breakage caused by new examples.
5379 2004-07-10 Seth Nickell <seth@gnome.org>
5383 Add "message" argument to service-side dbus.Object
5384 methods. This will break existing services written
5385 using the python bindings, but will allow extraction
5386 of all the message information (e.g. who its from).
5388 Add improved "object oriented" signal handling/emission.
5390 * python/examples/example-service.py:
5394 * python/examples/example-signal-emitter.py:
5395 * python/examples/example-signal-recipient.py:
5397 Two new examples that show how to emit and receive
5398 signals using the new APIs.
5400 * python/examples/example-signals.py:
5401 * python/examples/gconf-proxy-service.py:
5402 * python/examples/gconf-proxy-service2.py:
5404 Add "message" argument to service methods.
5406 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
5408 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
5409 * dbus/bus.c (dbus_bus_get_unix_user)
5410 * doc/dbus-specification.xml: implement GetConnectionUnixUser
5411 method of org.freedesktop.DBus interface.
5413 * bus/dispatch.c: test case
5415 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
5417 * python/Makefile.am: switched include directory from glib/ to dbus/
5418 since dbus-glib.h moved
5420 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
5422 * configure.in: prevent building the gcj stuff and libxml loader
5423 since they are broken.
5425 2004-06-20 Havoc Pennington <hp@redhat.com>
5427 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
5428 codes from the dbus error names
5430 * glib/dbus-glib.h: move to subdir dbus/ since it's included
5431 as dbus/dbus-glib.h and that breakage is now visible due to
5432 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
5434 * glib/dbus-glib.h: s/gproxy/g_proxy/
5436 * dbus/dbus-shared.h: new header to hold stuff shared with
5439 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
5442 * glib/dbus-glib.h (dbus_set_g_error): move to
5443 dbus-glib-lowlevel.h
5445 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
5446 of stuff to enable this
5448 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
5450 * a bunch of other changes with the same basic "separate glib
5451 bindings from dbus.h" theme
5453 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
5455 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
5457 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
5459 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
5461 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
5462 the reply value of the ServiceExists message.
5464 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
5466 * python/dbus_bindings.pyx.in: No longer need to parse path
5467 elements and pass them as arrays of strings. The C API now
5468 accepts plain path strings.
5469 (_build_parsed_path): removed
5471 2004-06-07 Havoc Pennington <hp@redhat.com>
5473 * doc/TODO: remove auto-activation item since it's done; sort
5474 items by importance/milestone
5476 2004-06-07 Havoc Pennington <hp@redhat.com>
5478 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
5479 random signature when using REQUIRED_FIELDS (this hack won't work
5482 * dbus/dbus-message.c: change the signature to be a header field,
5483 instead of message->signature special-case string. Incremental
5484 step forward. Then we can fix up code to send the signature in the
5485 message, then fix up code to validate said signature, then fix up
5486 code to not put the typecodes inline, etc.
5487 (load_one_message): don't make up the signature after the fact
5488 (decode_header_data): require signature field for the known
5491 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
5493 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
5495 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
5497 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
5499 * mono/Handler.cs: Updated to follow new path argument for
5500 (un-)registering objects.
5502 * mono/example/Makefile.am:
5504 * configure.in: Bumped required version for mono and use new -pkg
5507 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
5509 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
5510 registration functions take the path argument as char* instead of
5513 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
5514 split off the path decompostion part of
5515 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
5518 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
5520 2004-06-02 Kristian Høgsberg <krh@redhat.com>
5522 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
5523 machine approach. A state is implemented as a function that
5524 handles incoming events as specified for that state.
5526 * doc/dbus-specification.xml: Update auth protocol state machine
5527 specification to match implementation. Remove some leftover
5530 2004-06-02 Kristian Høgsberg <krh@redhat.com>
5532 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
5533 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
5536 * Doxyfile.in: remove deprecated options.
5538 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
5539 glib/test-thread.h, glib/test-thread-client.c,
5540 glib/test-thread-server.c, glib/test-profile.c,
5541 glib/test-dbus-glib.c: remove these unused files.
5543 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
5545 * dbus/dbus-object-tree.c
5546 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
5547 non-fallback handlers (bug #684).
5548 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
5549 (find_subtree_recurse): report wether the returned subtree is an
5550 exact match or a "fallback" match higher up in the tree.
5551 (object_tree_test_iteration): update test case.
5553 2004-06-01 Seth Nickell <seth@gnome.org>
5555 * python/dbus_bindings.pyx.in:
5556 * python/tests/test-client.py:
5558 Round off basic type support. Add dicts (yay!), and
5559 remaining array types.
5561 Make MessageIter more general so it works for dicts too.
5563 Mark all loop variables as C integers.
5565 2004-05-31 Havoc Pennington <hp@redhat.com>
5567 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
5570 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
5572 * glib/dbus-glib-tool.c (main): set up to have a --self-test
5573 option that runs the tests, and start filling in some code
5574 including for starters just dumping the interfaces to stdout
5576 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
5578 * test/data/valid-introspection-files/lots-of-types.xml: test of
5579 an example introspection file
5581 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
5584 2004-05-31 Seth Nickell <seth@gnome.org>
5586 * python/dbus_bindings.pyx.in:
5587 * python/tests/test-client.py:
5592 Fix string array memory trashing bug... oops...
5594 2004-05-30 Seth Nickell <seth@gnome.org>
5598 Add a nicer-but-less-flexible alternate API for handling
5599 calls to virtual objects in dbus.ObjectTree.
5601 Screw up the argument order to the dbus.Object constructor
5602 for consistency with dbus.ObjectTree (and to make dbus_methods
5603 optional for future extension)
5605 * python/examples/Makefile.am:
5606 * python/examples/gconf-proxy-service.py:
5607 * python/examples/gconf-proxy-service2.py:
5609 Alternate implementation of gconf-proxy-service using the
5610 nicer dbus.ObjectTree API.
5612 * python/examples/example-service.py:
5613 * python/tests/test-server.py
5615 Reverse the argument order to deal with dbus.Object constructor
5618 2004-05-30 Seth Nickell <seth@gnome.org>
5620 * python/examples/example-client.py:
5621 * python/examples/example-service.py:
5623 Take it back. Lists seem to work but they're broken
5624 in the test suite. Make the base examples use
5627 2004-05-30 Seth Nickell <seth@gnome.org>
5629 * python/dbus_bindings.pyx.in:
5630 * python/tests/test-client.py:
5632 Add some more tests and fix errors that crop up.
5633 Unfortunately, currently it seems like marshalling
5634 and unmarshalling of lists is completely broken :-(
5636 2004-05-30 Seth Nickell <seth@gnome.org>
5638 * python/dbus_bindings.pyx.in:
5640 Add support for ObjectPath type.
5644 Refactor message handling code to a common function.
5646 * python/tests/test-client.py:
5647 * python/tests/test-server.py:
5649 Add tests that check to make sure values of all types
5650 can be echoed from a service w/o mangling.
5652 2004-05-29 Seth Nickell <seth@gnome.org>
5656 Add ObjectTree class which allows implementation
5657 of trees of "virtual" objects. Basically the python
5658 wrapper for "register_fallback".
5660 * python/examples/Makefile.am
5661 * python/examples/gconf-proxy-client.py:
5662 * python/examples/gconf-proxy-service.py:
5664 Implement a simple GConf proxy service that supports
5665 get/set on string and int GConf keys using the ObjectTree.
5667 2004-05-29 Seth Nickell <seth@gnome.org>
5670 * python/examples/example-client.py:
5671 * python/examples/example-service.py:
5672 * python/examples/list-system-services.py:
5674 Add SessionBus, SystemBus and ActivationBus classes
5675 so you don't need to know the special little BUS_TYPE
5678 2004-05-29 Havoc Pennington <hp@redhat.com>
5680 * bus/config-parser.c (process_test_valid_subdir): temporarily
5681 stop testing config parser OOM handling, since expat has issues
5682 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
5684 * bus/dbus-daemon-1.1.in: change requested_reply to
5685 send_requested_reply/receive_requested_reply so we can send the
5686 replies, not just receive them.
5688 * bus/config-parser.c: parse the new
5689 send_requested_reply/receive_requested_reply
5691 * bus/policy.c (bus_client_policy_check_can_send): add
5692 requested_reply argument and use it
5694 * bus/bus.c (bus_context_check_security_policy): pass through
5695 requested_reply status to message send check
5697 * bus/system.conf.in: adapt to requested_reply change
5699 2004-05-28 Havoc Pennington <hp@redhat.com>
5701 * test/glib/test-service-glib.c (main): remove unused variable
5703 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
5705 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
5706 from the enum, no longer in use.
5708 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
5711 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
5712 whether error_name passed in is a valid error name.
5714 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
5716 * dbus/dbus-message.c (dbus_message_get_args): Added support for
5717 OBJECT_PATH and OBJECT_PATH_ARRAY
5719 2004-05-28 Seth Nickell <seth@gnome.org>
5721 * python/examples/Makefile.am:
5723 Forget to add Makefile.am. Do not pass go.
5725 2004-05-28 Michael Meeks <michael@ximian.com>
5727 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
5730 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
5732 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
5733 (_dbus_message_iter_get_basic_type_array): impl.
5734 drastically simplify ~all relevant _get methods to use these.
5735 (_dbus_message_iter_append_basic_array),
5736 (dbus_message_iter_append_basic): impl
5737 drastically simplify ~all relevant _append methods to use these.
5739 * dbus/dbus-message-builder.c (parse_basic_type)
5740 (parse_basic_array, lookup_basic_type): impl.
5741 (_dbus_message_data_load): prune scads of duplicate /
5744 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
5745 (_dbus_demarshal_basic_type): implement,
5746 (demarshal_and_validate_len/arg): beef up debug.
5747 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
5749 2004-05-27 Seth Nickell <seth@gnome.org>
5752 * python/Makefile.am:
5754 Include the example python apps in the tarball.
5756 * python/examples/list-system-services.py
5758 Add a python new example that fetches the list of services
5759 from the system bus.
5761 2004-05-27 Seth Nickell <seth@gnome.org>
5764 * python/dbus_bindings.pyx.in:
5766 Fix failure to notify that a signal was not handled,
5767 resulted in hung functions.
5769 2004-05-25 Colin Walters <walters@redhat.com>
5771 * tools/dbus-monitor.c (main): Monitor all types of messages.
5773 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
5775 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
5776 which unregisters the object path and disposes the handler.
5778 2004-05-23 Kristian Høgsberg <krh@redhat.com>
5780 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
5782 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
5783 operands to && so we call dbus_message_iter_next () for the last
5786 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
5788 * dbus/dbus-object-tree.c
5789 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
5790 children even if the requested path isn't registered.
5791 (object_tree_test_iteration): test object_tree_list_registered.
5793 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
5796 2004-05-20 Kristian Høgsberg <krh@redhat.com>
5798 * doc/TODO: Remove resolved items.
5800 * bus/expirelist.h (struct BusExpireList): remove unused n_items
5803 * bus/connection.c (bus_connections_expect_reply): Enforce the
5804 per-connection limit on pending replies.
5806 Patch from Jon Trowbridge <trow@ximian.com>:
5808 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
5809 up a watch that triggers a config reload when one end of the pipe
5811 (signal_handler): Instead of doing the config reload in our SIGHUP
5812 handler, just write to the reload pipe and let the associated
5813 watch handle the reload when control returns to the main loop.
5815 * bus/driver.c (bus_driver_handle_reload_config): Added.
5816 Implements a ReloadConfig method for requesting a configuration
5817 file reload via the bus driver.
5819 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
5821 * HACKING: Updated release instructions concerning the wiki page.
5823 2004-05-18 Kristian Høgsberg <krh@redhat.com>
5825 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
5826 filter against auth->allowed_mechs; we only add allowed mechs in
5827 record_mechanisms().
5829 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
5830 ALLOWED_MECHS to auth-script format so we can set the list of
5833 * data/auth/client-out-of-mechanisms.auth-script: New test to
5834 check client disconnects when it is out of mechanisms to try.
5836 * dbus/dbus-auth.c (process_command): Remove check for lines
5837 longer that 1 MB; we only buffer up maximum 16 kB.
5839 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
5840 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
5841 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
5842 assume there might be unused bytes.
5844 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
5845 client-out-of-mechs, it is handled in process_reject(). Move check
5846 for max failures to send_rejected(), as it's a server-only thing.
5848 * dbus/dbus-auth.c: Factor out protocol reply code into functions
5849 send_auth(), send_data(), send_rejected(), send_error(),
5850 send_ok(), send_begin() and send_cancel().
5852 2004-05-17 Kristian Høgsberg <krh@redhat.com>
5854 Remove base64 encoding, replace with hex encoding. Original patch
5855 from trow@ximian.com, added error handling.
5857 * dbus/dbus-string.c (_dbus_string_base64_encode)
5858 (_dbus_string_base64_decode): Remove.
5859 (_dbus_string_hex_decode): Add end_return argument so we can
5860 distinguish between OOM and invalid hex encoding.
5861 (_dbus_string_test): Remove base64 tests and add test case for
5864 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
5865 Replace base64 with hex.
5867 * test/data/auth/invalid-hex-encoding.auth-script: New test case
5868 for invalid hex encoded data in auth protocol.
5870 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
5872 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
5875 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
5877 * mono/dbus-sharp.dll.config.in: Added for GAC
5878 * mono/dbus-sharp.snk: Added for GAC
5879 * mono/Assembly.cs.in: Added for GAC
5880 * mono/Makefile.am: Changes for GAC installation
5881 * configure.in: Added refs for dbus-sharp.dll.config.in and
5882 Assembly.cs.in. More fixes for mono testing
5883 * mono/example/Makefile.am: Changed var to CSC
5884 * Makefile.am: Changed flag name to DBUS_USE_CSC
5886 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
5888 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
5889 * mono/doc/*: Added documentation framework
5890 * configure.in: Added monodoc check
5891 * README: Added description of mono configure flags
5893 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
5895 * doc/dbus-specification.xml: Added a "Required" column to the
5896 header fields table and changed the "zero or more" verbage in
5897 the above paragraph to read "The header must contain the required
5898 named header fields and zero or more of the optional named header
5900 * test/data/invalid-messages/*.message: Added the required PATH
5901 named header field to the tests so that they don't fail on
5902 'Missing path field'
5904 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
5906 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
5907 the stack by implicitly defining variable and parameter types and
5908 removing the hack of defining C pointers as python objects and later
5911 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
5913 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
5915 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
5917 * mono/DBusType/Dict.cs: Handle empty dicts
5918 * mono/DBusType/Array.cs: Handle empty arrays
5919 * mono/Arguments.cs: Handle empty arguments
5921 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
5923 * dbus-sharp.pc.in: Modified to include include Libs and Requires
5926 2004-04-25 Kristian Høgsberg <krh@redhat.com>
5928 * test/data/valid-messages/standard-*.message: Update message
5929 test scripts to new header field names.
5931 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
5933 * test/break-loader.c (randomly_do_n_things): tracked down buffer
5934 overflow to times_we_did_each_thing array which would chop off the
5935 first character of the failure_dir string. Increased the size of
5936 the array to 7 to reflect the number of random mutation functions
5939 2004-04-21 Kristian Høgsberg <krh@redhat.com>
5941 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
5942 unix_server->watch here, it is unreffed in disconnect.
5943 (_dbus_server_new_for_tcp_socket): convert NULL host to
5944 "localhost" here so we don't append NULL to address.
5946 * dbus/dbus-server.c (_dbus_server_test): Add test case for
5947 various addresses, including tcp with no explicit host.
5949 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
5951 * dbus/dbus-message.c (decode_header_data, decode_string_field):
5952 fix incorrect setting of .name_offset in the HeaderField (it was
5953 off by two bytes, positioned right after the name and typecode)
5955 * bus/bus.c (bus_context_new, bus_context_unref): test before
5956 calling dbus_server_free_data_slot and _dbus_user_database_unref
5957 in case of an error.
5959 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
5962 2004-04-19 Kristian Høgsberg <krh@redhat.com>
5964 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
5965 _dbus_poll() instead of select().
5967 2004-04-15 Jon Trowbridge <trow@ximian.com>
5969 * bus/main.c (signal_handler): Reload the configuration files
5971 (main): Set up our SIGHUP handler.
5973 * bus/bus.c (struct BusContext): Store the config file, user and
5974 fork flag in the BusContext.
5975 (process_config_first_time_only): Added. Contains the code
5976 (previously in bus_context_new) for setting up the BusContext from
5977 the BusConfigParser that should only be run the first time the
5978 config files are read.
5979 (process_config_every_time): Added. Contains the code (previously
5980 in bus_context_new) for setting up the BusContext from the
5981 BusConfigParser that should be run every time the config files are
5983 (load_config): Added. Builds a BusConfigParser from the config
5984 files and passes the resulting structure off to
5985 process_config_first_time_only (assuming this is the first time)
5986 and process_config_every_time.
5987 (bus_context_new): All of the config-related code has been moved
5988 to process_config_first_time_only and process_config_every_time.
5989 Now this function just does the non-config-related initializations
5990 and calls load_config.
5991 (bus_context_reload_config): Added.
5993 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
5995 * bus/driver.c (bus_driver_handle_get_service_owner):
5996 implement a GetServiceOwner method.
5997 * doc/dbus-specification.xml: document it.
5998 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
6000 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
6001 implement, using the bus GetServiceOwner method.
6003 * test/glib/test-dbus-glib.c:
6004 use dbus_gproxy_new_for_service_owner so that we can receive the
6007 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
6009 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
6010 dbus/dbus-message.c, dbus/dbus-protocol.h
6011 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
6013 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
6014 dbus/dbus-message.c, dbus/dbus-protocol.h
6015 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
6017 * dbus/dbus-internals.c (_dbus_header_field_to_string):
6018 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
6019 DBUS_HEADER_FIELD_SENDER resolves to "sender"
6021 * doc/dbus-specification.xml (Header Fields Table):
6022 s/SERVICE/DESTINATION
6023 s/SENDER_SERVICE/SENDER
6026 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
6028 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
6031 2004-04-13 Michael Meeks <michael@ximian.com>
6033 * glib/dbus-gobject.c (handle_introspect): split out
6034 (introspect_properties): this.
6035 (handle_introspect): implement this.
6037 * test/glib/Makefile.am: use the absolute path so the bus
6038 daemon's chdir ("/") doesn't kill us dead.
6040 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
6042 2004-04-12 Jon Trowbridge <trow@ximian.com>
6044 * bus/config-parser.c (struct BusConfigParser): Added
6045 included_files field.
6046 (seen_include): Added. Checks whether or not a file has already
6047 been included by any parent BusConfigParser.
6048 (bus_config_parser_new): Copy the parent's included_files.
6049 (include_file): Track which files have been included, and fail on
6050 circular inclusions.
6051 (process_test_valid_subdir): Changed printf to report if we are
6052 testing valid or invalid conf files.
6053 (all_are_equiv): Changed printf to be a bit clearer about
6054 what we are actually doing.
6055 (bus_config_parser_test): Test invalid configuration files.
6057 2004-04-09 Jon Trowbridge <trow@ximian.com>
6059 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
6060 argument. If non-null, the newly-constructed BusConfigParser will
6061 be initialized with the parent's BusLimits instead of the default
6063 (include_file): When including a config file, pass in
6064 the current parser as the parent and then copy the BusLimits
6065 from the included BusConfigParser pack to the current parser.
6066 (process_test_valid_subdir): Renamed from process_test_subdir.
6067 (process_test_equiv_subdir): Added. Walks through a directory,
6068 descending into each subdirectory and loading the config files
6069 it finds there. If any subdirectory contains two config files
6070 that don't produce identical BusConfigParser structs, fail.
6071 For now, the BusConfigParser's BusPolicies are not compared.
6072 (bus_config_parser_test): Call both process_test_valid_subdir and
6073 process_test_equiv_subdir.
6075 * bus/config-loader-libxml.c (bus_config_load): Take a parent
6076 argument and pass it along to the call to bus_config_parser_new.
6077 Also made a few small changes to allow this code to compile.
6079 * bus/config-loader-expat.c (bus_config_load): Take a parent
6080 argument and pass it along to the call to bus_config_parser_new.
6082 * bus/bus.c (bus_context_new): Load the config file
6083 with a NULL parent argument.
6085 2004-03-29 Michael Meeks <michael@ximian.com>
6087 * glib/dbus-gobject.c (introspect_properties): split
6088 out, fix mangled 'while' flow control.
6089 (introspect_signals): implement.
6090 (handle_introspect): update.
6092 2004-03-29 Michael Meeks <michael@ximian.com>
6094 * glib/dbus-gobject.c (set_object_property): split out /
6095 re-work, use the property type, and not the message type(!)
6096 (get_object_property): ditto.
6098 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
6099 (dbus_gvalue_marshal): make this code re-usable, needed
6100 for signals too, also on both proxy and server side.
6101 Re-write for more efficiency / readability.
6103 2004-03-29 Michael Meeks <michael@ximian.com>
6105 * dbus/dbus-message.c
6106 (dbus_message_new_error_printf): impl.
6108 * dbus/dbus-connection.c
6109 (dbus_connection_unregister_object_path): fix warning.
6111 * configure.in: fix no-mono-installed situation.
6113 2004-03-27 Havoc Pennington <hp@redhat.com>
6115 Patch from Timo Teräs:
6117 * tools/dbus-send.c (main): if --print-reply, assume type is
6118 method call; support boolean type args
6120 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
6121 bunch of memleak and logic bugs
6123 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
6125 * mono/Arguments.cs:
6126 * mono/Introspector.cs:
6128 * mono/InterfaceProxy.cs:
6130 * mono/ProxyBuilder.cs:
6132 Added InterfaceProxy class to avoid building proxies for every
6136 * dbus-message.c (dbus_message_append_args_valist)
6137 (dbus_message_iter_get_object_path)
6138 (dbus_message_iter_get_object_path_array)
6139 (dbus_message_iter_append_object_path)
6140 (dbus_message_iter_append_object_path_array):
6141 Added object_path iter functions to handle OBJECT_PATH arguments
6143 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
6145 First checkin of mono bindings.
6148 Build stuff for the bindings
6149 * dbus-sharp.pc.in: Added for pkgconfig
6151 2004-03-21 Havoc Pennington <hp@redhat.com>
6153 * test/test-service.c (main): remove debug spew
6155 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
6157 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
6160 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
6161 (dbus_message_iter_init_array_iterator)
6162 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
6163 indicate whether the iterator is empty
6165 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
6168 2004-03-19 Havoc Pennington <hp@redhat.com>
6170 * NEWS: 0.21 updates
6172 * configure.in: 0.21
6174 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
6176 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
6177 you don't need pyrex to make dist
6179 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
6182 2004-03-18 Richard Hult <richard@imendio.com>
6184 * dbus/dbus-message.c (dbus_message_get_auto_activation)
6185 (dbus_message_set_auto_activation): Add doxygen docs.
6187 2004-03-16 Richard Hult <richard@imendio.com>
6189 * bus/activation.c: (bus_activation_service_created),
6190 (bus_activation_send_pending_auto_activation_messages),
6191 (bus_activation_activate_service):
6193 * bus/dispatch.c: (bus_dispatch),
6194 (check_nonexistent_service_auto_activation),
6195 (check_service_auto_activated),
6196 (check_segfault_service_auto_activation),
6197 (check_existent_service_auto_activation), (bus_dispatch_test):
6198 * bus/driver.c: (bus_driver_handle_activate_service):
6199 * bus/services.c: (bus_registry_acquire_service):
6200 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
6201 (dbus_message_get_auto_activation):
6202 * dbus/dbus-message.h:
6203 * dbus/dbus-protocol.h: Implement auto-activation.
6205 * doc/dbus-specification.xml: Add auto-activation to the spec.
6207 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
6209 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
6210 fix a bug with CUSTOM types.
6212 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
6213 a unit test for this bug (used to fail).
6215 2004-03-12 Mikael Hallendal <micke@imendio.com>
6218 (babysitter_watch_callback): notify all pending activations waiting for
6219 the same exec that the activation failed.
6220 (bus_activation_activate_service): shortcut the activation if we
6221 already waiting for the same executable to start up.
6223 2004-03-12 Mikael Hallendal <micke@imendio.com>
6226 - Added service file reloading.
6227 Each service files directory is kept in an hash table in
6228 BusActivation and each BusActivationEntry knows what .service-file it
6229 was read from. So when you try to activate a service the bus will
6230 check if it's been updated, removed or if new .service-files has
6232 - Test code at the bottom for the service file reloading.
6233 * bus/test-main.c: (main):
6235 - added service reloading test.
6236 * dbus/dbus-sysdeps.c:
6237 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
6239 2004-03-08 Michael Meeks <michael@ximian.com>
6241 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
6242 bail immediately if disconnected, to avoid busy loop.
6244 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
6245 cleanup cut/paste/inefficiency.
6247 2004-03-01 David Zeuthen <david@fubar.dk>
6249 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
6250 bug where args were used twice. This bug resulted in a segfault
6251 on a Debian/PPC system when starting the messagebus daemon. Include
6252 dbus-sysdeps.h for DBUS_VA_COPY
6254 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
6256 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
6257 appropriate va_copy implementation. From GLib
6259 2004-02-24 Joe Shaw <joe@ximian.com>
6261 * bus/services.c (bus_registry_acquire_service): We need to pass
6262 in the service name to dbus_set_error() to prevent a crash.
6264 2003-12-26 Anders Carlsson <andersca@gnome.org>
6266 * AUTHORS: Reveal my True identity.
6268 2003-12-17 Mikael Hallendal <micke@imendio.com>
6270 * dbus/dbus-message.c: (dbus_message_append_args_valist):
6271 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
6273 2003-12-13 Mikael Hallendal <micke@imendio.com>
6275 * doc/TODO: Added not about better error check of configuration files.
6277 2003-12-02 Richard Hult <richard@imendio.com>
6279 * Update AFL version to 2.0 throughout the source files to reflect
6280 the update that was done a while ago.
6282 2003-12-02 Richard Hult <richard@imendio.com>
6284 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
6285 wrote_dict_key to FALSE on the iter that the dict is appended to,
6286 just like when appending other types. Fixes a bug where a dict
6287 couldn't be put inside a dict.
6288 (dbus_message_iter_append_dict_key): Fix typo in warning message.
6289 (message_iter_test, _dbus_message_test): Add test case for dict
6292 2003-12-01 David Zeuthen <david@fubar.dk>
6294 * python/dbus.py: Add the actual message when calling the reciever
6295 of a signal such that parameters can be inspected. Add the method
6296 remove_signal_receiver
6298 2003-11-26 Mikael Hallendal <micke@imendio.com>
6302 * glib/*.[ch]: Made ref functions return the pointer
6304 2003-11-25 Zack Rusin <zack@kde.org>
6306 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
6308 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
6311 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
6312 the Integrator and to better fit with the server,
6314 2003-11-24 Zack Rusin <zack@kde.org>
6316 * qt/connection.h, qt/connection.cpp: removing initDbus method since
6317 the integrator handles it now
6319 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
6320 since QTimer wasn't really meant to be used the way DBusTimeout is
6322 2003-11-24 Zack Rusin <zack@kde.org>
6324 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
6325 Integrator class which integrates D-BUS with the Qt event loop,
6327 * qt/connection.h, qt/connection.cpp: Move all the code which
6328 was dealing with D-BUS integration to the Integrator class,
6329 and start using Integrator,
6331 2003-11-23 Zack Rusin <zack@kde.org>
6333 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
6336 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
6337 switching namespaces to DBusQt, reworking the class,
6339 * Makefile.cvs: switching dependencies so that it matches KDE
6342 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
6345 2003-11-19 Havoc Pennington <hp@redhat.com>
6349 * configure.in: bump version to 0.20
6351 * configure.in (have_qt): add yet another place to look for qt
6352 (someone hand trolltech a .pc file...)
6354 2003-11-01 Havoc Pennington <hp@redhat.com>
6356 * doc/dbus-specification.xml: add state machine docs on the auth
6357 protocol; just a first draft, I'm sure it's wrong.
6359 2003-10-28 David Zeuthen <david@fubar.dk>
6361 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
6362 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
6364 2003-10-28 Havoc Pennington <hp@redhat.com>
6366 * dbus/dbus-message.c (get_next_field): delete unused function
6368 2003-10-28 Havoc Pennington <hp@redhat.com>
6370 * bus/expirelist.c (do_expiration_with_current_time): detect
6371 failure of the expire_func due to OOM
6373 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
6375 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
6376 NoReply error that's now created by the bus when the service exits
6378 2003-10-28 Havoc Pennington <hp@redhat.com>
6380 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
6381 tests for set_path, set_interface, set_member, etc.
6383 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
6385 * dbus/dbus-message.c (set_string_field): always just delete and
6386 re-append the field; accept NULL for deletion
6387 (re_align_fields_recurse): reimplement
6389 2003-10-26 Havoc Pennington <hp@redhat.com>
6391 * dbus/dbus-connection.c: fix docs to properly describe the
6392 disconnected message
6393 (_dbus_connection_notify_disconnected): remove this function;
6394 we can't synchronously add the disconnected message, we have to
6395 do it after we've queued any remaining real messages
6396 (_dbus_connection_get_dispatch_status_unlocked): queue the
6397 disconnect message only if the transport has finished queueing all
6398 its real messages and is disconnected.
6399 (dbus_connection_disconnect): update the dispatch status here
6401 2003-10-22 Havoc Pennington <hp@redhat.com>
6403 * bus/bus.c (bus_context_check_security_policy): fix up assertion
6405 * bus/connection.c (bus_transaction_send_from_driver): set the
6406 destination to the connection's base service
6408 2003-10-20 Havoc Pennington <hp@redhat.com>
6410 hmm, make check is currently not passing.
6412 * doc/dbus-specification.xml: add requirement that custom type
6413 names follow the same rules as interface names.
6415 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
6416 duplication and allow 'c' to be 'custom'; dict is now 'm' for
6419 * doc/dbus-specification.xml: update type codes to match
6420 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
6421 CUSTOM. Add type OBJECT_PATH to the spec.
6423 2003-10-17 Havoc Pennington <hp@redhat.com>
6425 * bus/driver.c (create_unique_client_name): use "." as separator
6426 in base service names instead of '-'
6428 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
6429 byte at the end of the string
6431 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
6432 optimization macros since string validation seems to be a slow
6435 * doc/dbus-specification.xml: restrict valid
6436 service/interface/member/error names. Add test suite code for the
6439 * dbus/dbus-string.c: limit service/interface/member/error names
6442 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
6443 format arg to verbose spew
6445 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
6446 memory, return instead of g_error
6448 * test/test-service.c (path_message_func): support emitting a
6451 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
6452 activation bus type if DBUS_BUS_ACTIVATION was set; default to
6453 assuming the activation bus was the session bus so that services
6454 started manually will still register.
6455 (init_connections_unlocked): fix so that in OOM situation we get
6456 the same semantics when retrying the function
6458 * test/test-service.c (main): change to use path registration, to
6459 test those codepaths; register with DBUS_BUS_ACTIVATION rather
6460 than DBUS_BUS_SESSION
6462 2003-10-16 Havoc Pennington <hp@redhat.com>
6464 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
6466 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
6467 coverage of the tests
6468 (coverage-report.txt): don't move the .da and .bbg files around
6470 2003-10-16 Havoc Pennington <hp@redhat.com>
6472 * bus/bus.c (struct BusContext): remove struct field I didn't mean
6475 2003-10-16 Havoc Pennington <hp@redhat.com>
6477 * bus/connection.c (bus_pending_reply_expired): either cancel or
6479 (bus_connections_check_reply): use unlink, not remove_link, as we
6480 don't want to free the link; fixes double free mess
6482 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
6483 where no reply was received
6485 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
6488 * bus/signals.c (match_rule_matches): add special cases for the
6489 bus driver, so you can match on sender/destination for it.
6491 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
6492 DBUS_PRINT_BACKTRACE is set
6494 * dbus/dbus-internals.c: add pid to assertion failure messages
6496 * dbus/dbus-connection.c: add message type code to the debug spew
6498 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
6499 sender=foo not service=foo
6501 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
6502 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
6503 DBUS_ACTIVATION_ADDRESS instead
6505 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
6506 DBUS_SYSTEM_BUS_ADDRESS if appropriate
6508 * bus/bus.c (bus_context_new): handle OOM copying bus type into
6511 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
6512 (dbus_message_iter_get_object_path_array): new function (half
6513 finished, disabled for the moment)
6515 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
6516 DBUS_MESSAGE_TYPE_ERROR
6518 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
6519 avoid redirecting stderr to /dev/null
6520 (babysit): close stdin if not doing the "exit_with_session" thing
6522 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
6523 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
6524 stdout/stdin, so things don't get confused
6526 * bus/system.conf.in: fix to allow replies, I modified .conf
6527 instead of .conf.in again.
6529 2003-10-14 David Zeuthen <david@fubar.dk>
6531 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
6532 argtype to arg_type when raising unknown arg type exception.
6533 Changed type list to reflect the changes in dbus-protocol.h so
6534 the bindings actually work.
6536 2003-10-14 Havoc Pennington <hp@redhat.com>
6538 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
6539 to have a bug keeping it from outputting the .da files sometimes
6540 (string_get_string): don't append garbage nul bytes to the string.
6542 2003-10-15 Seth Nickell <seth@gnome.org>
6544 * python/Makefile.am:
6546 Include dbus_h_wrapper.h in the dist tarball.
6548 2003-10-14 Havoc Pennington <hp@redhat.com>
6550 * bus/bus.c (bus_context_check_security_policy): revamp this to
6551 work more sanely with new policy-based requested reply setup
6553 * bus/connection.c (bus_transaction_send_from_driver): set bus
6554 driver messages as no reply
6556 * bus/policy.c (bus_client_policy_check_can_receive): handle a
6557 requested_reply attribute on allow/deny rules
6559 * bus/system.conf: add <allow requested_reply="true"/>
6561 * bus/driver.c (bus_driver_handle_message): fix check for replies
6562 sent to the bus driver, which was backward. How did this ever work
6563 at all though? I think I'm missing something.
6565 * dbus/dbus-message.c (decode_header_data): require error and
6566 method return messages to have a reply serial field to be valid
6567 (_dbus_message_loader_queue_messages): break up this function;
6568 validate that reply serial and plain serial are nonzero;
6569 clean up the OOM/error handling.
6570 (get_uint_field): don't return -1 from this
6571 (dbus_message_create_header): fix signed/unsigned bug
6573 * bus/connection.c (bus_connections_expect_reply): save serial of
6574 the incoming message, not reply serial
6576 2003-10-14 Havoc Pennington <hp@redhat.com>
6578 * bus/connection.c: implement pending reply tracking using
6581 * bus/bus.c (bus_context_check_security_policy): verify that a
6582 reply is pending in order to allow a reply to be sent. Deny
6583 messages of unknown type.
6585 * bus/dbus-daemon-1.1.in: update to mention new resource limits
6587 * bus/bus.c (bus_context_get_max_replies_per_connection): new
6588 (bus_context_get_reply_timeout): new
6590 2003-10-13 Seth Nickell <seth@gnome.org>
6592 * python/Makefile.am:
6594 Pass "make distcheck": remove a couple files from DIST_FILES
6595 that weren't included in the final version.
6597 2003-10-12 Havoc Pennington <hp@pobox.com>
6599 Added test code that 1) starts an actual bus daemon and 2) uses
6600 DBusGProxy; fixed bugs that were revealed by the test. Lots
6601 more testing possible, but this is the basic framework.
6603 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
6604 empty proxy lists from the proxy list hash
6606 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
6607 couple of return_if_fail checks
6609 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
6610 to allocate, so everything is cleared to NULL as it should be.
6612 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
6613 source as data to dbus_connection_set_timeout_functions() as the
6614 timeout functions expected
6616 * test/glib/run-test.sh: add a little script to start up a message
6617 bus and run tests using it
6619 * tools/dbus-launch.1: updates
6621 * tools/dbus-launch.c (main): add --config-file option
6623 * tools/dbus-launch.c (main): remove confusing else if (runprog)
6624 that could never be reached.
6626 * dbus/dbus-message.c (dbus_message_new_method_return)
6627 (dbus_message_new_error, dbus_message_new_signal): set the
6628 no-reply-expected flag on all these. Redundant, but may
6629 as well be consistent.
6631 2003-10-11 Havoc Pennington <hp@pobox.com>
6633 * test/decode-gcov.c (function_solve_graph): make broken block
6634 graph a nonfatal error since it seems to be broken. Need to debug
6637 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
6638 can't just check type > INVALID < LAST anymore
6640 * dbus/dbus-message.c (dbus_message_get_signature): new function
6641 (dbus_message_has_signature): new function
6642 (struct DBusMessage): add signature field (right now it isn't sent
6643 over the wire, just generated on the fly)
6644 (dbus_message_copy): copy the signature, and init strings to
6645 proper length to avoid some reallocs
6646 (dbus_message_iter_init_array_iterator): return void, since it
6648 (dbus_message_iter_init_dict_iterator): return void since it can't fail
6649 (_dbus_message_loader_queue_messages): add silly temporary hack to
6650 fill in message->signature on load
6652 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
6653 characters, so they are relatively human-readable.
6655 2003-10-11 Havoc Pennington <hp@pobox.com>
6657 * dbus/dbus-message.c (_dbus_message_test): add more test
6658 coverage, but #if 0 for now since they uncover a bug
6659 not fixed yet; I think in re_align_field_recurse()
6660 (re_align_field_recurse): add FIXME about broken assertion
6662 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
6664 * bus/connection.c: share a couple code bits with expirelist.c
6666 * bus/expirelist.h, bus/expirelist.c: implement a generic
6667 expire-items-after-N-seconds facility, was going to share between
6668 expiring connections and replies, decided not to use for expiring
6669 connections for now.
6671 * COPYING: include AFL 2.0 (still need to change all the file headers)
6673 2003-10-09 Havoc Pennington <hp@redhat.com>
6675 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
6676 gcc 3.3. Not that we do anything about it yet.
6678 * bus/signals.c (bus_match_rule_parse): impose max length on the
6681 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
6683 2003-10-09 Havoc Pennington <hp@redhat.com>
6685 Make matching rules theoretically work (add parser).
6687 * bus/bus.c (bus_context_check_security_policy): fix up to handle
6688 the case where destination is explicitly specified as bus driver
6689 and someone else is eavesdropping.
6691 * bus/policy.c (bus_client_policy_check_can_receive): fix up
6692 definition of eavesdropping and assertion
6694 * tools/dbus-send.c (main): use dbus_message_type_from_string
6696 * bus/signals.c (bus_match_rule_parse): implement
6698 * dbus/dbus-message.c (dbus_message_type_from_string): new
6700 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
6702 2003-10-02 Havoc Pennington <hp@pobox.com>
6704 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
6705 dbus_gproxy_oneway_call
6707 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
6708 (dbus_server_setup_with_g_main): fix to allow calling them more
6709 than once on the same args
6710 (dbus_bus_get_with_g_main): new function
6712 2003-10-02 Havoc Pennington <hp@redhat.com>
6714 * doc/dbus-tutorial.xml: write some stuff
6716 2003-09-29 Havoc Pennington <hp@pobox.com>
6718 * configure.in: split checks for Doxygen from XML docs, check for
6721 * doc/Makefile.am: XML-ify all the docs, and add a blank
6724 2003-09-29 Havoc Pennington <hp@pobox.com>
6726 * Merge dbus-object-names branch. To see the entire patch
6727 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
6728 it's huuuuge though.
6729 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
6731 2003-09-28 Havoc Pennington <hp@pobox.com>
6733 * HACKING: update to reflect new server
6735 2003-09-26 Seth Nickell <seth@gnome.org>
6738 * python/examples/example-signals.py:
6740 Start implementing some notions of signals. The API
6741 is really terrible, but they sort of work (with the
6742 exception of being able to filter by service, and to
6743 transmit signals *as* a particular service). Need to
6744 figure out how to make messages come from the service
6747 * python/dbus_bindings.pyx.in:
6749 Removed duplicate message_handler callbacks.
6751 2003-09-25 Havoc Pennington <hp@redhat.com>
6753 * bus/session.conf.in: fix my mess
6755 2003-09-25 Havoc Pennington <hp@pobox.com>
6757 * bus/session.conf.in: fix security policy, reported by Seth Nickell
6759 2003-09-25 Seth Nickell <seth@gnome.org>
6761 * python/examples/example-service.py:
6763 Johan notices complete wrong code in example-service, but
6764 completely wrong in a way that works exactly the same (!).
6765 Johan is confused, how could this possibly work? Example
6766 code fails to serve purpose of making things clear.
6769 2003-09-25 Mark McLoughlin <mark@skynet.ie>
6771 * doc/dbus-specification.sgml: don't require header fields
6772 to be 4-byte aligned and specify that fields should be
6773 distinguished from padding by the fact that zero is not
6776 * doc/TODO: remove re-alignment item and add item to doc
6777 the OBJECT_PATH type.
6779 * dbus/dbus-message.c:
6780 (HeaderField): rename the original member to value_offset
6781 and introduce a name_offset member to keep track of where
6782 the field actually begins.
6783 (adjust_field_offsets): remove.
6784 (append_int_field), (append_uint_field),
6785 (append_string_field): don't align the start of the header
6786 field to a 4-byte boundary.
6787 (get_next_field): impl finding the next marhsalled field
6788 after a given field.
6789 (re_align_field_recurse): impl re-aligning a number of
6790 already marshalled fields.
6791 (delete_field): impl deleting a field of any type and
6792 re-aligning any following fields.
6793 (delete_int_or_uint_field), (delete_string_field): remove.
6794 (set_int_field), (set_uint_field): no need to re-check
6795 that we have the correct type for the field.
6796 (set_string_field): ditto and impl re-aligning any
6798 (decode_header_data): update to take into account that
6799 the fields aren't 4-byte aligned any more and the new
6800 way to distinguish padding from header fields. Also,
6801 don't exit when there is too much header padding.
6802 (process_test_subdir): print the directory.
6803 (_dbus_message_test): add test to make sure a following
6804 field is re-aligned correctly after field deletion.
6806 * dbus/dbus-string.[ch]:
6807 (_dbus_string_insert_bytes): rename from insert_byte and
6808 allow the insert of multiple bytes.
6809 (_dbus_string_test): test inserting multiple bytes.
6811 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
6812 warning note to docs about having to re-align any
6813 marshalled values following the string.
6815 * dbus/dbus-message-builder.c:
6816 (append_string_field), (_dbus_message_data_load):
6817 don't align the header field.
6819 * dbus/dbus-auth.c: (process_test_subdir): print the
6822 * test/break-loader.c: (randomly_add_one_byte): upd. for
6825 * test/data/invalid-messages/bad-header-field-alignment.message:
6828 * test/data/valid-messages/unknown-header-field.message: shove
6829 a dict in the unknown field.
6831 2003-09-25 Seth Nickell <seth@gnome.org>
6834 * python/dbus_bindings.pyx.in:
6836 Handle return values.
6838 * python/examples/example-client.py:
6839 * python/examples/example-service.py:
6841 Pass back return values from the service to the client.
6843 2003-09-24 Seth Nickell <seth@gnome.org>
6847 Connect Object methods (when you are sharing an object) up... pass
6848 in a list of methods to be shared. Sharing all the methods just
6849 worked out too weird. You can now create nice Services over the
6852 * python/dbus_bindings.pyx.in:
6854 Keep references to user_data tuples passed into C functions so
6855 Python doesn't garbage collect on us.
6857 Implement MethodReturn and Error subclasses of Message for creating
6858 DBusMessage's of those types.
6860 * python/examples/example-client.py:
6861 * python/examples/example-service.py:
6863 Simple example code showing both how create DBus services and objects,
6864 and how to use them.
6866 2003-09-23 Havoc Pennington <hp@pobox.com>
6868 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
6870 2003-09-23 Havoc Pennington <hp@redhat.com>
6872 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
6873 (dbus_gproxy_disconnect_signal): implement
6874 (dbus_gproxy_manager_remove_signal_match): implement
6875 (dbus_gproxy_manager_add_signal_match): implement
6876 (dbus_gproxy_oneway_call): implement
6878 2003-09-23 Havoc Pennington <hp@pobox.com>
6880 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
6881 subclass. This means dropping the transparent thread safety of the
6882 proxy; you now need a separate proxy per-thread, or your own
6883 locking on the proxy. Probably right anyway.
6884 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
6886 2003-09-22 Havoc Pennington <hp@redhat.com>
6888 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
6890 2003-09-21 Seth Nickell <seth@gnome.org>
6892 First checkin of the Python bindings.
6894 * python/.cvsignore:
6895 * python/Makefile.am:
6896 * python/dbus_bindings.pyx.in:
6897 * python/dbus_h_wrapper.h:
6899 Pieces for Pyrex to operate on, building a dbus_bindings.so
6900 python module for low-level access to the DBus APIs.
6904 High-level Python module for accessing DBus objects.
6909 Build stuff for the python bindings.
6913 Extra macro needed for finding the Python C header files.
6915 2003-09-21 Havoc Pennington <hp@pobox.com>
6917 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
6918 implementing the proxy manager, didn't get very far.
6920 * dbus/dbus-bus.c (dbus_bus_add_match): new
6921 (dbus_bus_remove_match): new
6923 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
6924 path_name argument; adjust the other not-yet-implemented
6925 gproxy constructors to be what I think they should be.
6927 2003-09-21 Havoc Pennington <hp@pobox.com>
6929 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
6930 by default for message bus connections.
6932 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
6933 exit_on_disconnect flag is set and we process the disconnected
6935 (dbus_connection_set_exit_on_disconnect): new function
6937 2003-09-21 Havoc Pennington <hp@pobox.com>
6939 Get matching rules mostly working in the bus; only actually
6940 parsing the rule text remains. However, the client side of
6941 "signal connections" hasn't been started, this patch is only the
6944 * dbus/dispatch.c: fix for the matching rules changes
6946 * bus/driver.c (bus_driver_handle_remove_match)
6947 (bus_driver_handle_add_match): send an ack reply from these
6950 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
6951 arguments, reported by Seth Nickell
6953 * bus/config-parser.c (append_rule_from_element): support
6954 eavesdrop=true|false attribute on policies so match rules
6955 can be prevented from snooping on the system bus.
6957 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
6958 and "destination" in attribute names; fix some docs bugs;
6959 add eavesdrop=true|false attribute
6961 * bus/driver.c (bus_driver_handle_add_match)
6962 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
6965 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
6966 rid of broadcast service concept, signals are just always broadcast
6968 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
6969 mostly implement matching rules stuff (currently only exposed as signal
6972 2003-09-21 Mark McLoughlin <mark@skynet.ie>
6974 * doc/dbus-specification.sgml: Change the header field name
6975 to be an enum and update the rest of the spec to reference
6976 the fields using the conventinal name.
6978 * dbus/dbus-protocol.h: update to reflect the spec.
6980 * doc/TODO: add item to remove the 4 byte alignment requirement.
6982 * dbus/dbus-message.c: Remove the code to generalise the
6983 header/body length and serial number header fields as named
6984 header fields so we can reference field names using the
6986 (append_int_field), (append_uint_field), (append_string_field):
6987 Append the field name as a byte rather than four chars.
6988 (delete_int_or_uint_field), (delete_string_field): reflect the
6989 fact that the field name and typecode now occupy 4 bytes instead
6991 (decode_string_field), (decode_header_data): update to reflect
6992 protocol changes and move the field specific encoding from
6993 decode_string_field() back into decode_header_data().
6995 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
6996 Add utility to aid debugging.
6998 * dbus/dbus-message-builder.c:
6999 (append_string_field), (_dbus_message_data_load): Update to
7000 reflect protocol changes; Change the FIELD_NAME directive
7001 to HEADER_FIELD and allow it to take the field's conventional
7002 name rather than the actual value.
7004 * test/data/*/*.message: Update to use HEADER_FIELD instead
7005 of FIELD_NAME; Always align the header on an 8 byte boundary
7006 *before* updating the header length.
7008 2003-09-15 Havoc Pennington <hp@pobox.com>
7010 * dbus/dbus-pending-call.c: add the get/set object data
7011 boilerplate as for DBusConnection, etc. Use generic object data
7012 for the notify callback.
7014 * glib/dbus-gparser.c (parse_node): parse child nodes
7016 * tools/dbus-viewer.c: more hacking on the dbus-viewer
7018 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
7019 contain functions shared between the convenience lib and the
7022 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
7023 -export-symbols-regex to the GLib library
7025 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
7026 fix the locking in here, and add a default handler for
7027 Introspect() that just returns sub-nodes.
7029 2003-09-14 Havoc Pennington <hp@pobox.com>
7031 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
7032 rather than gfoo consistent
7034 * glib/dbus-gproxy.h: delete for now, move contents to
7035 dbus-glib.h, because the include files don't work right since we
7036 aren't in the dbus/ subdir.
7038 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
7039 (dbus_gproxy_end_call): finish
7040 (dbus_gproxy_begin_call): finish
7042 * glib/dbus-gmain.c (dbus_set_g_error): new
7044 * glib/dbus-gobject.c (handle_introspect): include information
7045 about child nodes in the introspection
7047 * dbus/dbus-connection.c (dbus_connection_list_registered): new
7048 function to help in implementation of introspection
7050 * dbus/dbus-object-tree.c
7051 (_dbus_object_tree_list_registered_and_unlock): new function
7053 2003-09-12 Havoc Pennington <hp@pobox.com>
7055 * glib/dbus-gidl.h: add common base class for all the foo_info
7058 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
7061 * test/Makefile.am: try test srcdir -ef . in addition to test
7062 srcdir = ., one of them should work (yeah lame)
7064 * glib/Makefile.am: build the "idl" parser stuff as a convenience
7067 * glib/dbus-gparser.h: make description_load routines return
7068 NodeInfo* not Parser*
7070 * Makefile.am (SUBDIRS): build test dir after all library dirs
7072 * configure.in: add GTK+ detection
7074 2003-09-07 Havoc Pennington <hp@pobox.com>
7076 * Make Doxygen contented.
7078 2003-09-07 Havoc Pennington <hp@pobox.com>
7080 * doc/dbus-specification.sgml: more updates
7082 2003-09-06 Havoc Pennington <hp@pobox.com>
7084 * doc/dbus-specification.sgml: partial updates
7086 * bus/dbus-daemon-1.1.in: fix the config file docs for the
7087 zillionth time; hopefully I edited the right file this time.
7089 * bus/config-parser.c (append_rule_from_element): support
7090 send_type, send_path, receive_type, receive_path
7092 * bus/policy.c: add message type and path to the list of things
7093 that can be "firewalled"
7095 2003-09-06 Havoc Pennington <hp@pobox.com>
7097 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
7098 (dbus_connection_register_object_path): make this not handle
7099 messages to paths below the given path
7101 2003-09-03 Havoc Pennington <hp@pobox.com>
7103 * test/glib/Makefile.am: add this with random glib-linked test
7106 * glib/Makefile.am: remove the random test programs from here,
7107 leave only the unit tests
7109 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
7110 uscore/javacaps conversion, and fix
7111 (get_object_property, set_object_property): change to .NET
7112 convention for mapping props to methods, set_FooBar/get_FooBar,
7113 since one language has such a convention we may as well copy it.
7114 Plus real methods in either getFooBar or get_foo_bar style won't
7115 collide with this convention.
7117 2003-09-01 Havoc Pennington <hp@pobox.com>
7119 * glib/dbus-gparser.c: implement
7121 * glib/dbus-gobject.c: start implementing skeletons support
7123 * configure.in: when disabling checks/assert, also define
7124 G_DISABLE_ASSERT and G_DISABLE_CHECKS
7126 2003-09-01 Havoc Pennington <hp@pobox.com>
7128 * glib/Makefile.am: rearrange a bunch of files and get "make
7129 check" framework set up
7131 2003-08-31 Havoc Pennington <hp@pobox.com>
7133 * fix build with --disable-tests
7135 2003-08-30 Havoc Pennington <hp@pobox.com>
7137 * dbus/dbus-connection.c: purge DBusMessageHandler
7139 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
7140 use callbacks everywhere
7142 2003-08-30 Havoc Pennington <hp@pobox.com>
7144 * test/data/valid-config-files/system.d/test.conf: change to
7145 root for the user so warnings don't get printed
7147 * dbus/dbus-message.c: add dbus_message_get_path,
7148 dbus_message_set_path
7150 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
7151 dispatching to a path
7153 * dbus/dbus-string.c (_dbus_string_validate_path): add
7155 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
7156 (_dbus_marshal_object_path): implement
7158 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
7159 to contain the path to the target object
7160 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
7161 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
7163 2003-08-30 Havoc Pennington <hp@pobox.com>
7165 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
7167 2003-08-29 Havoc Pennington <hp@pobox.com>
7169 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
7171 (struct DBusObjectSubtree): shrink this
7172 a lot, since we may have a lot of them
7173 (_dbus_object_tree_free_all_unlocked): implement
7174 (_dbus_object_tree_dispatch_and_unlock): implement
7176 2003-08-29 Havoc Pennington <hp@pobox.com>
7178 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
7180 2003-08-28 Havoc Pennington <hp@pobox.com>
7184 * dbus/dbus-connection.c: port to no ObjectID, create a
7185 DBusObjectTree, rename ObjectTree to ObjectPath in public API
7187 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
7188 everything except UnregisterFunction and MessageFunction
7190 * dbus/dbus-marshal.c: port away from DBusObjectID,
7191 add DBUS_TYPE_OBJECT_PATH
7193 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
7194 dbus/dbus-objectid.[hc]: remove these, we are moving to
7195 path-based object IDs
7197 2003-08-25 Havoc Pennington <hp@pobox.com>
7199 Just noticed that dbus_message_test is hosed, I wonder when I
7200 broke that. I thought make check was passing earlier...
7202 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
7203 container tree, will replace most of dbus-object-registry
7205 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
7208 2003-08-19 Havoc Pennington <hp@pobox.com>
7210 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
7211 (dbus_message_is_error): fix this function
7213 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
7216 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
7217 reflect clarified man page
7218 (bus_client_policy_check_can_send): ditto
7220 * bus/session.conf.in: fixup
7222 * bus/system.conf.in: fixup
7224 2003-08-18 Havoc Pennington <hp@redhat.com>
7226 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
7228 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
7229 dumb bug created earlier (wrong order of args to
7230 decode_header_data())
7232 * tools/dbus-send.c: port
7234 * tools/dbus-print-message.c (print_message): port
7236 * test/data/*messages: port all messages over
7238 * dbus/dbus-message-builder.c: support including
7241 * bus/driver.c: port over
7243 * bus/dispatch.c: port over to new stuff
7245 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7246 rename disconnect signal to "Disconnected"
7248 2003-08-17 Havoc Pennington <hp@pobox.com>
7250 This doesn't compile yet, but syncing up so I can hack on it from
7251 work. What are branches for if not broken code? ;-)
7253 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
7254 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
7255 DBUS_HEADER_FIELD_ERROR_NAME
7257 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
7258 for the interface+member pairs
7259 (string_hash): change to use g_str_hash algorithm
7260 (find_direct_function, find_string_function): refactor these to
7263 * dbus/dbus-message.c: port all of this over to support
7264 interface/member fields instead of name field
7266 * dbus/dbus-object-registry.c: port over
7268 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
7269 from _dbus_string_validate_name
7271 * bus/dbus-daemon-1.1: change file format for the
7272 <deny>/<allow> stuff to match new message naming scheme
7274 * bus/policy.c: port over
7276 * bus/config-parser.c: parse new format
7278 2003-08-16 Havoc Pennington <hp@pobox.com>
7280 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
7283 * glib/dbus-gproxy.c: some hacking
7285 2003-08-15 Havoc Pennington <hp@redhat.com>
7287 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
7289 * dbus/dbus-connection.c
7290 (dbus_connection_send_with_reply_and_block): factor out internals;
7291 change to convert any error replies to DBusError instead of
7292 returning them as a message
7294 2003-08-15 Havoc Pennington <hp@pobox.com>
7296 * dbus/dbus-connection.c,
7297 dbus/dbus-pending-call.c: Finish the pending call stuff
7299 2003-08-14 Havoc Pennington <hp@redhat.com>
7301 * dbus/dbus-pending-call.c: start on new object that will replace
7302 DBusMessageHandler and ReplyHandlerData for tracking outstanding
7305 * dbus/dbus-gproxy.c: start on proxy object used to communicate
7306 with remote interfaces
7308 * dbus/dbus-gidl.c: do the boring boilerplate in here
7310 2003-08-12 Havoc Pennington <hp@pobox.com>
7312 * bus/dispatch.c (bus_dispatch): make this return proper
7313 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
7315 * dbus/dbus-errors.c (dbus_set_error): use
7316 _dbus_string_append_printf_valist
7318 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
7319 (_dbus_string_append_printf): new
7321 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
7324 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
7325 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
7326 message is unhandled.
7328 2003-08-11 Havoc Pennington <hp@pobox.com>
7330 * bus/test.c (client_disconnect_handler): change to return
7331 HANDLED (would have been REMOVE_MESSAGE)
7333 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
7334 HANDLED/NOT_YET_HANDLED instead of
7335 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
7338 2003-08-10 Havoc Pennington <hp@pobox.com>
7340 * tools/dbus-send.c (main): add --type argument, for now
7341 supporting only method_call and signal types.
7343 * tools/dbus-print-message.c: print message type
7345 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7346 init connection->objects
7348 * doc/dbus-specification.sgml: fix sgml
7350 * bus/*.c: port over to object-instance API changes
7352 * test/test-service.c: ditto
7354 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
7355 name, we will have to fix up the rest of the code to also handle
7357 (dbus_message_new): generic message-creation call
7358 (set_string_field): allow appending name field
7360 2003-08-06 Havoc Pennington <hp@pobox.com>
7362 * dbus/dbus-object-registry.c: implement signal connection
7365 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
7367 * dbus/dbus-internals.c (_dbus_memdup): new function
7369 2003-08-02 Havoc Pennington <hp@pobox.com>
7371 * dbus/dbus-message.c (dbus_message_get_no_reply)
7372 (dbus_message_set_no_reply): add these and remove
7373 set_is_error/get_is_error
7375 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
7376 remove the ERROR flag, since there's now an ERROR type
7378 2003-08-01 Havoc Pennington <hp@pobox.com>
7380 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
7383 * dbus/dbus-message.c (dbus_message_get_type): new function
7385 * doc/dbus-specification.sgml: add "type" byte to messages
7387 2003-08-01 Havoc Pennington <hp@pobox.com>
7389 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
7390 a message type enum to distinguish kinds of message
7391 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
7392 that need not be replied to
7394 2003-08-01 Havoc Pennington <hp@pobox.com>
7396 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
7397 (unpack_8_octets): fix no-64-bit-int bug
7399 * dbus/dbus-object-registry.c (validate_id): validate the
7400 connection ID bits, not just the instance ID.
7402 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
7403 the connection-global 33 bits of the object ID
7405 * dbus/dbus-object-registry.c (info_from_entry): fill in
7406 object ID in the new way
7408 * dbus/dbus-objectid.h: rather than high/low bits, specifically
7409 define server/client/instance bits.
7411 2003-07-30 Havoc Pennington <hp@pobox.com>
7413 * dbus/dbus-connection.c (dbus_connection_register_object): fix
7416 2003-07-13 Havoc Pennington <hp@pobox.com>
7418 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
7419 fields to DBusObjectVTable and DBusObjectInfo
7421 2003-07-12 Havoc Pennington <hp@pobox.com>
7423 * dbus/dbus-object-registry.c: implement unit test,
7424 fix bugs discovered in process
7426 * dbus/dbus-connection.c: remove handler_table and
7427 register_handler(), add DBusObjectRegistry usage
7429 * dbus/dbus-objectid.c (dbus_object_id_is_null)
7430 (dbus_object_id_set_null): new functions
7432 2003-07-08 Havoc Pennington <hp@pobox.com>
7434 * dbus/dbus-object.c: implement some of this
7436 * dbus/dbus-object-registry.c
7437 (_dbus_object_registry_add_and_unlock): fill in the object_id out
7439 (_dbus_object_registry_new): handle OOM
7441 2003-07-08 Havoc Pennington <hp@pobox.com>
7443 * dbus/dbus-object.h: sketch out an API for registering objects
7444 with a connection, that allows us to use as little as 24 bytes
7445 per object and lets application code represent an object in
7446 any conceivable way.
7448 * dbus/dbus-object-registry.c: implement the hard bits of the
7449 DBusConnection aspect of object API. Not yet wired up.
7451 2003-07-06 Havoc Pennington <hp@pobox.com>
7453 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
7454 (_dbus_marshal_object_id): new
7455 (_dbus_demarshal_object_id): new
7456 (_dbus_marshal_get_arg_end_pos): support object ID type, and
7457 consolidate identical switch cases. Don't conditionalize handling
7458 of DBUS_TYPE_UINT64, need to handle the type always.
7459 (_dbus_marshal_validate_arg): consolidate identical cases, and
7460 handle DBUS_TYPE_OBJECT_ID
7462 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
7464 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
7466 2003-09-28 Havoc Pennington <hp@pobox.com>
7470 2003-09-28 Havoc Pennington <hp@pobox.com>
7472 * doc/Makefile.am (dbus-specification.html): testing a funky hack
7473 to work with Debian db2html
7475 2003-09-28 Havoc Pennington <hp@pobox.com>
7477 * configure.in: 0.13
7479 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
7480 stylesheet-images for benefit of Debian
7482 Change back to using filesystem-linked sockets for the system
7483 bus, so only root can create the default system bus address.
7485 * bus/system.conf.in: change to use
7486 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7488 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
7491 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7492 here, and AC_DEFINE DBUS_SYSTEM_PATH
7494 2003-08-09 Anders Carlsson <andersca@codefactory.se>
7497 * doc/busconfig.dtd:
7500 2003-08-09 Anders Carlsson <andersca@codefactory.se>
7502 * doc/dbus-specification.sgml:
7503 Add activation reply values.
7505 2003-08-05 Havoc Pennington <hp@redhat.com>
7507 * configure.in: 0.12
7509 2003-08-05 Anders Carlsson <andersca@codefactory.se>
7511 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
7512 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
7513 (add_watch), (remove_watch), (create_source):
7514 Refcount fds, fixes some reentrancy issues.
7516 2003-07-30 Havoc Pennington <hp@redhat.com>
7518 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
7519 bus address to be abstract if we have abstract sockets
7523 2003-07-28 Havoc Pennington <hp@redhat.com>
7525 * bus/messagebus.in: fix to avoid processname/servicename
7526 confusion, from Michael Kearey
7527 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
7529 2003-07-23 Havoc Pennington <hp@pobox.com>
7531 * dbus/dbus-message.c (dbus_message_iter_get_named):
7532 fix from Andy Hanton to remove broken "+1"
7534 2003-07-16 Havoc Pennington <hp@pobox.com>
7536 * tools/dbus-launch.c (babysit): close stdout/stderr in the
7537 babysitter process, as suggested by Thomas Leonard, so
7538 an "eval `dbus-launch --exit-with-session`" will actually
7541 2003-07-16 Havoc Pennington <hp@pobox.com>
7543 * configure.in: print out EXPANDED_* variables in the summary at
7544 the end; clean up the code that computes EXPANDED_ variables and
7545 get the ones using exec_prefix right. Should make things work
7546 when you build without --prefix
7548 2003-06-29 Havoc Pennington <hp@pobox.com>
7550 * mono/Test.cs (class Test): fire up a main loop and run it
7552 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
7553 done once, the app has to do it
7555 2003-06-26 Havoc Pennington <hp@pobox.com>
7557 * mono/Connection.cs: set up connection with the glib main loop
7559 2003-07-01 Havoc Pennington <hp@redhat.com>
7561 * doc/dbus-specification.sgml: clarify the format of a type code,
7562 change suggested by Jim Blandy
7564 2003-06-29 Miloslav Trmac <mitr@volny.cz>
7567 * tools/Makefile.am: Don't assume srcdir == builddir.
7569 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
7570 the allocated block.
7571 (_dbus_memory_test): New function.
7572 * dbus/dbus-test.h: Add _dbus_memory_test ().
7573 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
7575 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
7577 (dbus_message_new): Remove obsolete @todo.
7579 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
7580 (_dbus_marshal_set_uint64): Fix comment.
7582 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
7583 hardcode FIELD_REPLY_SERIAL.
7585 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
7586 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
7588 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
7589 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
7591 2003-06-24 Havoc Pennington <hp@pobox.com>
7593 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
7595 2003-06-23 Anders Carlsson <andersca@codefactory.se>
7601 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
7602 * gcj/org/.cvsignore:
7603 * gcj/org/Makefile.am:
7604 * gcj/org/freedesktop/.cvsignore:
7605 * gcj/org/freedesktop/Makefile.am:
7606 * gcj/org/freedesktop/dbus/.cvsignore:
7607 * gcj/org/freedesktop/dbus/Makefile.am:
7608 * gcj/org/freedesktop/dbus/Message.java: (Message),
7610 * gcj/org/freedesktop/dbus/natMessage.cc:
7611 Fix the build system.
7613 2003-06-22 Havoc Pennington <hp@pobox.com>
7615 * mono/Connection.cs: add more bindings
7617 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
7620 2003-06-22 Havoc Pennington <hp@pobox.com>
7622 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
7623 Start wrapping more stuff.
7625 2003-06-22 Havoc Pennington <hp@pobox.com>
7627 * mono/Message.cs: implement Message.Wrap() that ensures we only
7628 have a single C# wrapper per DBusMessage, assuming it works which
7629 it probably doesn't.
7631 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
7632 (dbus_message_free_data_slot): new
7633 (dbus_message_set_data): new
7634 (dbus_message_get_data): new
7636 2003-06-22 Havoc Pennington <hp@pobox.com>
7638 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
7639 (_dbus_data_slot_allocator_alloc): rework these to keep a
7640 reference count on each slot and automatically manage a global
7641 slot ID variable passed in by address
7643 * bus/bus.c: convert to new dataslot API
7645 * dbus/dbus-bus.c: convert to new dataslot API
7647 * dbus/dbus-connection.c: convert to new dataslot API
7649 * dbus/dbus-server.c: convert to new dataslot API
7651 * glib/dbus-gmain.c: ditto
7655 * bus/connection.c: ditto
7657 2003-06-22 Anders Carlsson <andersca@codefactory.se>
7659 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
7660 after the gcj checks so that the correct configuration tags
7661 will be added to libtool.
7663 * dbus-glib-1.pc.in: No need to specify any includes since
7664 dbus-1.pc.in has those.
7666 2003-06-22 Havoc Pennington <hp@pobox.com>
7668 * mono/*, gcj/*, configure.in, Makefile.am:
7669 Check in makefiles and subdirs for mono and gcj bindings.
7670 Neither binding actually exists, just trying to get through
7671 all the build and other boring bits.
7673 2003-06-21 Philip Blundell <philb@gnu.org>
7675 * tools/dbus-monitor.1: Updated.
7677 * tools/dbus-send.1: Likewise.
7679 2003-06-20 Anders Carlsson <andersca@codefactory.se>
7681 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
7682 for hangup and error after checking read so we won't discard
7683 pending data if both hangup and read are set.
7685 2003-06-19 Philip Blundell <philb@gnu.org>
7687 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
7689 * tools/dbus-send.c: Accept both --system and --session.
7691 * tools/dbus-monitor.c: Same here.
7693 2003-06-19 Anders Carlsson <andersca@codefactory.se>
7695 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
7696 from C++ (Patch by Miloslav Trmac).
7698 2003-06-15 Joe Shaw <joe@assbarn.com>
7700 * configure.in: Check for socklen_t.
7702 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
7704 * test/test-segfault.c: Add #include <sys/time.h>
7706 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
7707 dbus-launch needs it.
7709 2003-06-09 Havoc Pennington <hp@redhat.com>
7711 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
7712 SUN_LEN, it breaks abstract socket usage
7714 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
7717 2003-06-04 Havoc Pennington <hp@pobox.com>
7719 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
7720 using unix:abstract=/foo, and when listening in a tmpdir
7721 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
7723 * dbus/dbus-transport.c (_dbus_transport_open): support
7726 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
7727 support abstract sockets
7729 * dbus/dbus-transport-unix.c
7730 (_dbus_transport_new_for_domain_socket): support abstract sockets
7732 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
7733 toggle as an argument, implement abstract namespace support
7734 (_dbus_listen_unix_socket): ditto
7736 * configure.in: add --enable-abstract-sockets and implement
7737 a configure check for autodetection of the right value.
7739 2003-06-01 Havoc Pennington <hp@pobox.com>
7741 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
7742 in /tmp (though on Linux this will end up being useless,
7743 when we add abstract namespace support)
7745 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
7748 2003-05-28 Colin Walters <walters@verbum.org>
7750 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
7752 2003-05-18 Anders Carlsson <andersca@codefactory.se>
7754 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
7756 2003-05-17 Colin Walters <walters@gnu.org>
7758 * tools/dbus-send.c: Don't exit with an error code if --help was
7759 passed. Default to using the session bus instead of the system
7762 * tools/dbus-launch.c: Ditto.
7764 * tools/dbus-monitor.c: Ditto.
7766 * tools/dbus-send.1: Update with new arguments.
7768 * tools/dbus-launch.c: Emit code to export variables. New
7769 arguments -s and -c to specify shell syntax, and a bit of code to
7770 autodetect syntax. Also, allow specifying a program to run.
7772 * tools/dbus-launch.1: Update with new arguments.
7774 * tools/dbus-send.1: Ditto.
7776 * tools/dbus-monitor.1: Ditto.
7778 2003-05-17 Havoc Pennington <hp@pobox.com>
7780 * bus/config-parser.c (merge_included): merge in policies from
7781 child configuration file.
7783 * bus/policy.c (bus_policy_merge): function to merge two policies
7786 2003-05-16 Havoc Pennington <hp@redhat.com>
7788 * dbus/dbus-connection.c: disable verbose lock spew
7790 * tools/dbus-send.c: add --print-reply command line option
7792 * tools/dbus-print-message.h (print_message): new util function
7793 shared by dbus-send and dbus-monitor
7795 * tools/dbus-monitor.c (handler_func): exit on disconnect
7797 * dbus/dbus-transport-unix.c (do_reading): if the transport is
7798 disconnected, don't try to use the read_watch
7800 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
7801 so we can find this bug more easily
7803 2003-05-16 Havoc Pennington <hp@redhat.com>
7805 * bus/policy.c (free_rule_list_func): avoid a crash when passed
7806 NULL as DBusHashTable is annoyingly likely to do.
7808 2003-05-16 Colin Walters <walters@verbum.org>
7810 * tools/dbus-monitor.c: Add --session argument and usage()
7813 * tools/dbus-monitor.1: Update with new --session arg.
7815 * bus/Makefile.am (install-data-hook): Create
7816 $(libdir)/dbus-1.0/services so that the session bus is happy.
7818 2003-05-15 Havoc Pennington <hp@redhat.com>
7820 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
7821 on non-x86. ifdef's are evil.
7823 2003-05-15 Havoc Pennington <hp@redhat.com>
7825 * configure.in: 0.11
7829 * bus/Makefile.am (initddir): apparently we are supposed to put
7830 init scripts in /etc/rc.d/init.d not /etc/init.d
7832 * bus/Makefile.am: remove the "you must --enable-tests to make
7833 check" as it broke distcheck
7835 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
7837 2003-05-13 James Willcox <jwillcox@gnome.org>
7840 * bus/activation.c: (bus_activation_service_created),
7841 (bus_activation_activate_service):
7842 * bus/driver.c: (bus_driver_send_service_deleted),
7843 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7844 (bus_driver_send_service_acquired),
7845 (bus_driver_send_welcome_message),
7846 (bus_driver_handle_list_services):
7847 * bus/session.conf.in:
7848 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
7849 (dbus_bus_service_exists), (dbus_bus_activate_service):
7852 Add some convenience API which lets you activate a service, and did a
7853 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
7854 and dbus_message_get_args()
7856 2003-05-11 Havoc Pennington <hp@pobox.com>
7858 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
7859 calling _dbus_marshal_validate_arg() for every byte in a byte
7862 * dbus/dbus-message-handler.c: use atomic reference counting to
7863 reduce number of locks slightly; the global lock in here sucks
7865 * dbus/dbus-connection.c
7866 (_dbus_connection_update_dispatch_status_and_unlock): variant of
7867 update_dispatch_status that can be called with lock held; then use
7868 in a couple places to reduce locking/unlocking
7869 (dbus_connection_send): hold the lock over the whole function
7870 instead of acquiring it twice.
7872 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
7874 * bus/connection.c (bus_connections_setup_connection): fix access
7875 to already-freed memory.
7877 * dbus/dbus-connection.c: keep a little cache of linked list
7878 nodes, to avoid using the global linked list alloc lock in the
7879 normal send-message case. Instead we just use the connection lock
7880 that we already have to take.
7882 * dbus/dbus-list.c (_dbus_list_find_last): new function
7884 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
7885 change to use a struct for the atomic type; fix docs,
7886 they return value before increment, not after increment.
7888 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
7889 (_dbus_string_append_8_aligned): new functions to try to
7890 microoptimize this operation.
7891 (reallocate_for_length): break this out of set_length(), to
7892 improve profile info, and also so we can consider inlining the
7895 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
7896 strings with some preallocation, cuts down on our calls to realloc
7897 a fair bit. Though if we can get the "move entire string to empty
7898 string" optimization below to kick in here, it would be better.
7900 * dbus/dbus-string.c (_dbus_string_move): just call
7901 _dbus_string_move_len
7902 (_dbus_string_move_len): add a special case for moving
7903 an entire string into an empty string; we can just
7904 swap the string data instead of doing any reallocs.
7905 (_dbus_string_init_preallocated): new function
7907 2003-05-11 Havoc Pennington <hp@pobox.com>
7909 Write a "test-profile" that does echo client-server with threads;
7910 profile reveals lock contention, memcpy/realloc of buffers, and
7911 UTF-8 validation as hot spots. 20% of lock contention eliminated
7912 with dbus_atomic_inc/dec implementation on x86. Much remaining
7913 contention is global mempool locks for GList and DBusList.
7915 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
7918 * dbus/dbus-connection.c (struct DBusConnection): use
7919 dbus_atomic_t for the reference count
7921 * dbus/dbus-message.c (struct DBusMessage): declare
7922 dbus_atomic_t values as volatile
7924 * configure.in: code to detect ability to use atomic integer
7925 operations in assembly, from GLib patch
7927 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
7928 time, tired of it being wrong in threads and forked processes
7930 * glib/test-profile.c: a little program to bounce messages back
7931 and forth between threads and eat CPU
7933 * dbus/dbus-connection.c: add debug spew macros for debugging
7934 thread locks; include config.h at top; fix deadlock in
7935 dbus_connection_flush()
7937 2003-05-08 Havoc Pennington <hp@pobox.com>
7939 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
7940 data from getting written, and there wasn't a good reason to
7943 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
7944 dbus_verbose lines in test coverage
7945 (main): add list of functions sorted by # of untested blocks
7946 to the coverage report
7948 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
7950 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
7952 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
7953 extend test coverage
7955 * test/data/auth/cancel.auth-script: test canceling an
7958 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
7959 aren't used. in CVS history if we end up needing them.
7961 2003-05-04 Havoc Pennington <hp@pobox.com>
7963 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
7966 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
7967 function, which assumed length was in # of strings, not bytes
7969 * dbus/dbus-message.c (_dbus_message_test): add tests for some
7972 * dbus/dbus-connection.c
7973 (_dbus_connection_queue_received_message): disable function for
7974 now, we are only using it in test mode
7976 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
7977 remove a mistaken FIXME
7979 2003-05-04 Havoc Pennington <hp@pobox.com>
7981 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
7982 unlock mutex on successful return, patch from Anders Gustafsson
7984 2003-05-04 Havoc Pennington <hp@pobox.com>
7986 * dbus-glib-1.pc.in (Requires): fix dependencies, from
7989 2003-05-04 Havoc Pennington <hp@pobox.com>
7991 * tools/dbus-launch.c: implement
7993 * bus/main.c (main), bus/bus.c (bus_context_new):
7994 implement --print-pid and --fork
7996 2003-05-03 Havoc Pennington <hp@redhat.com>
7998 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
7999 the address had no value, and add to test suite. Fix and
8000 regression test from Miloslav Trmac
8002 2003-05-03 Havoc Pennington <hp@pobox.com>
8004 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
8005 watch is invalid when handled
8007 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
8008 dbus-launch utility to launch the bus from a shell script. Didn't
8009 actually implement dbus-launch yet, it's just a placeholder still.
8011 2003-05-03 Havoc Pennington <hp@pobox.com>
8013 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
8014 daemon; also documents daemon config file, so replaces
8015 doc/config-file.txt. Corrected some stuff from config-file.txt in
8016 the process of moving it.
8018 2003-05-03 Havoc Pennington <hp@pobox.com>
8020 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
8023 2003-05-03 Colin Walters <walters@verbum.org>
8025 * dbus/dbus-sysdeps.c (fill_user_info): Test against
8026 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
8028 * Makefile.am: Update to use new .pc versioning scheme.
8030 2003-05-02 Havoc Pennington <hp@redhat.com>
8032 * bus/system.conf.in: allow send/receive to/from message bus
8035 2003-04-30 Havoc Pennington <hp@redhat.com>
8037 * configure.in: print a note when building with unit tests and
8040 2003-04-30 Havoc Pennington <hp@redhat.com>
8042 * Makefile.am: add a check-local that complains if you didn't
8043 configure with --enable-tests
8045 2003-04-29 Havoc Pennington <hp@redhat.com>
8047 * glib/dbus-gmain.c: docs cleanups
8049 * dbus/dbus-types.h: add docs on int64 types
8051 * dbus/dbus-memory.c: fix docs to avoid putting private API in
8052 public API docs section
8054 2003-04-29 Havoc Pennington <hp@redhat.com>
8056 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
8057 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
8058 parallel install API version, not with the D-BUS package version.
8060 * HACKING: move some of README over here
8062 * README: updates, and document API/ABI policy
8064 * configure.in: reindentation
8066 2003-04-29 Havoc Pennington <hp@redhat.com>
8068 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
8069 to use this library" to be sure people have the right
8072 2003-04-28 Havoc Pennington <hp@redhat.com>
8074 * configure.in: add --enable-docs which by default is auto yes if
8075 doxygen and db2html found, no otherwise; but can be forced on/off
8077 * doc/Makefile.am: conditionalize whether to build docs on
8080 2003-04-28 Havoc Pennington <hp@redhat.com>
8082 * configure.in: 0.10
8086 * bus/system.conf.in: add <includedir>system.d</includedir>
8088 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
8089 username was provided but not uid
8091 * bus/config-parser.c (struct BusConfigParser): keep track of
8092 whether the parser is toplevel or was included; change some
8093 of the error handling if it's included.
8095 2003-04-27 Havoc Pennington <hp@pobox.com>
8099 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
8100 report correct status if we finish processing authentication
8101 inside this function.
8103 * bus/activation.c (try_send_activation_failure): use
8104 bus_transaction_send_error_reply
8106 * bus/connection.c (bus_connection_get_groups): return an error
8107 explaining the problem
8109 * bus/bus.c (bus_context_check_security_policy): implement
8110 restriction here that inactive connections can only send the
8111 hello message. Also, allow bus driver to send anything to
8114 * bus/connection.c (bus_connection_complete): create the
8115 BusClientPolicy here instead of on-demand.
8116 (bus_connection_get_policy): don't return an error
8118 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
8119 sender field in message being replied to
8121 * bus/bus.c (bus_context_check_security_policy): fix silly typo
8122 causing it to return FALSE always
8124 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
8125 we checked sender rather than destination
8127 2003-04-25 Havoc Pennington <hp@redhat.com>
8129 test suite is slightly hosed at the moment, will fix soon
8131 * bus/connection.c (bus_connections_expire_incomplete): fix to
8132 properly disable the timeout when required
8133 (bus_connection_set_name): check whether we can remove incomplete
8134 connections timeout after we complete each connection.
8136 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
8137 probably still broken.
8139 * bus/services.c (bus_registry_acquire_service): implement max
8140 number of services owned, and honor allow/deny rules on which
8141 services a connection can own.
8143 * bus/connection.c (bus_connection_get_policy): report errors here
8145 * bus/activation.c: implement limit on number of pending
8148 2003-04-25 Havoc Pennington <hp@redhat.com>
8150 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
8151 where we used >= 0 instead of != DBUS_UID_UNSET.
8153 2003-04-25 Havoc Pennington <hp@redhat.com>
8155 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
8156 were toggled without add/remove, fix from Anders Gustafsson
8158 2003-04-24 Havoc Pennington <hp@redhat.com>
8160 * test/data/valid-config-files/basic.conf: add <limit> tags to
8163 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
8164 <limit> tag in configuration file.
8166 2003-04-24 Havoc Pennington <hp@redhat.com>
8168 * bus/dispatch.c: somehow missed some name_is
8170 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
8171 (_dbus_timeout_set_interval): new
8173 * bus/connection.c (bus_connections_setup_connection): record time
8174 when each connection is first set up, and expire them after the
8175 auth timeout passes.
8177 2003-04-24 Havoc Pennington <hp@redhat.com>
8179 * dbus/dbus-message.c (dbus_message_name_is): rename
8180 (dbus_message_service_is): rename
8181 (dbus_message_sender_is): rename
8182 (dbus_message_get_service): rename
8184 2003-04-24 Havoc Pennington <hp@redhat.com>
8186 * configure.in: add --enable-checks
8188 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
8190 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
8191 to use thread locks.
8192 (_dbus_connection_handler_destroyed_locked): move some private
8193 functions into proper docs group
8195 * dbus/dbus-internals.h: add _dbus_return_if_fail,
8196 _dbus_return_val_if_fail
8198 Throughout: use dbus_return_if_fail
8200 2003-04-23 James Willcox <jwillcox@gnome.org>
8203 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
8204 (dbus_connection_setup_with_g_main),
8205 (dbus_server_setup_with_g_main):
8206 * glib/test-dbus-glib.c: (main):
8207 * glib/test-thread-client.c: (main):
8208 * glib/test-thread-server.c: (new_connection_callback), (main):
8209 * tools/dbus-monitor.c: (main):
8211 Added a GMainContext argument to dbus_connection_setup_with_g_main()
8212 and dbus_server_setup_with_g_main().
8214 2003-04-20 Havoc Pennington <hp@pobox.com>
8216 * doc/dbus-specification.sgml: document the restrictions on
8217 message and service names
8219 2003-04-22 Havoc Pennington <hp@redhat.com>
8221 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
8222 support, and do some code cleanups to share more code and
8223 speed up array marshal/demarshal.
8225 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
8227 * configure.in: generate dbus-arch-deps.h
8229 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
8232 2003-04-22 Havoc Pennington <hp@redhat.com>
8234 * test/data/valid-messages/opposite-endian.message: fix test
8235 to use proper type for rply field
8237 * test/data/invalid-messages: add tests for below validation
8239 * dbus/dbus-message.c (decode_header_data): validate field types,
8240 and validate that named fields are valid names
8241 (decode_name_field): consider messages in the
8242 org.freedesktop.Local. namespace to be invalid.
8244 * dbus/dbus-string.c (_dbus_string_validate_name): new
8246 2003-04-19 Havoc Pennington <hp@pobox.com>
8248 * bus/driver.c (bus_driver_handle_hello): check limits and
8249 return an error if they are exceeded.
8251 * bus/connection.c: maintain separate lists of active and inactive
8252 connections, and a count of each. Maintain count of completed
8253 connections per user. Implement code to check connection limits.
8255 * dbus/dbus-list.c (_dbus_list_unlink): export
8257 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
8258 number of bytes in the message queue for a connection
8260 2003-04-18 Havoc Pennington <hp@pobox.com>
8262 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
8264 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
8267 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
8268 on realloc be sure to update the pointer in the keyring
8270 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
8271 offset to avoid writing to unallocated memory
8273 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
8274 try the next mechanism, so we properly handle OOM
8276 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
8278 (_dbus_keyring_new): fix OOM bug
8279 (_dbus_keyring_new_homedir): always set error; impose a maximum
8280 number of keys we'll load from the file, mostly to speed up the
8281 test suite and make its OOM checks more useful, but also for
8284 * dbus/dbus-auth.c (process_error_server): reject authentication
8285 if we get an error from the client
8286 (process_cancel): on cancel, send REJECTED, per the spec
8287 (process_error_client): send CANCEL if we get an error from the
8290 2003-04-18 Havoc Pennington <hp@pobox.com>
8292 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
8295 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
8298 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
8299 about DBUS_TEST_HOMEDIR once
8301 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
8304 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
8305 config file so we test the right thing
8307 Throughout: assorted docs improvements
8309 2003-04-18 Havoc Pennington <hp@pobox.com>
8311 * glib/dbus-gmain.c: adapt to watch changes
8313 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
8315 * dbus/dbus-server.h: remove dbus_server_handle_watch
8317 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
8319 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
8320 like DBusTimeout, so we don't need dbus_connection_handle_watch
8323 2003-04-17 Havoc Pennington <hp@redhat.com>
8325 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
8326 database usage so it all goes via the DBusUserDatabase cache.
8328 2003-04-17 Havoc Pennington <hp@redhat.com>
8330 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
8331 there was an OOM watch we skipped, we always return TRUE so we
8332 iterate again to have a look at it again. Fixes test suite hang.
8333 Code rearrangement also lets us lose some memset and only iterate
8334 over callbacks once.
8336 * bus/driver.c (bus_driver_handle_message): sense of test for
8339 2003-04-16 Havoc Pennington <hp@pobox.com>
8341 * doc/dbus-specification.sgml: make spec say serials are unsigned
8343 * dbus/dbus-message.h: change message serials to unsigned
8345 * dbus/dbus-connection.c: adapt to message serials being unsigned
8347 2003-04-15 Havoc Pennington <hp@pobox.com>
8349 * bus/bus.c: create and keep around a shared DBusUserDatabase
8352 * bus/connection.c (bus_connection_get_groups): don't cache
8353 groups for user in the connection object, since user database
8354 object now does that.
8356 2003-04-16 Havoc Pennington <hp@redhat.com>
8358 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
8359 list of size counters
8360 (_dbus_message_loader_putback_message_link): put back a popped link
8362 * dbus/dbus-connection.c
8363 (dbus_connection_set_max_live_messages_size): rename
8365 (dbus_connection_get_outgoing_size): get size of outgoing
8367 (_dbus_connection_set_connection_counter): remove this cruft
8369 2003-04-14 Havoc Pennington <hp@redhat.com>
8371 * dbus/dbus-userdb.c: user database abstraction, mostly to get
8372 caching, but at some point we might want to be able to use a
8375 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
8376 SHA1 conf file to test the sha1 auth mechanism, since the regular
8377 test always uses EXTERNAL when available.
8380 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
8381 add conf file that requires use of sha1 auth
8383 2003-04-13 Havoc Pennington <hp@pobox.com>
8385 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
8386 from Philip Blundell to send messages and monitor them.
8388 2003-04-13 Havoc Pennington <hp@pobox.com>
8390 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
8393 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
8396 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
8397 fix to only recover unused bytes if we're already authenticated
8398 (_dbus_transport_get_is_authenticated): fix to still mark us
8399 authenticated if there are unused bytes.
8401 * bus/dispatch.c: implement security policy checking
8403 * bus/connection.c (bus_transaction_send_from_driver): new
8405 * bus/bus.c (bus_context_check_security_policy): new
8407 * bus/dispatch.c (send_service_nonexistent_error): delete this,
8408 now we just set the DBusError and it gets converted to an error
8411 * bus/connection.c (allow_user_function): enable code using actual
8412 data from the config file
8414 * bus/policy.c (list_allows_user): handle wildcard rules for
8415 user/group connection perms
8417 2003-04-13 Havoc Pennington <hp@pobox.com>
8419 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
8421 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
8423 * bus/policy.c (bus_policy_append_mandatory_rule)
8424 (bus_policy_append_default_rule, bus_policy_append_user_rule)
8425 (bus_policy_append_group_rule): new functions
8427 2003-04-12 Havoc Pennington <hp@pobox.com>
8429 * bus/config-parser.c (bus_config_parser_new): fix a memleak
8431 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
8432 the pid/gid/uid, just for paranoia.
8434 * test/break-loader.c (randomly_do_n_things): find a byte
8435 containing a type code, and randomly change it to a different
8438 2003-04-12 Havoc Pennington <hp@pobox.com>
8440 * bus/policy.h: change BusPolicy to be the thing from the config
8441 file, and rename old BusPolicy to BusClientPolicy
8443 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
8444 match change in how policy works
8446 * dbus/dbus-internals.h: mark assert_not_reached as
8447 __attribute((noreturn))__
8449 2003-04-11 Havoc Pennington <hp@redhat.com>
8451 * doc/dbus-specification.sgml: fix a spot with the wrong name for
8452 the broadcast service. Use boolean return for ServiceExists.
8454 2003-04-11 Havoc Pennington <hp@redhat.com>
8456 * configure.in: add another directory to look for qt in.
8458 2003-04-11 Havoc Pennington <hp@redhat.com>
8460 * AUTHORS: add Colin Walters
8462 2003-04-11 Havoc Pennington <hp@redhat.com>
8468 2003-04-11 Havoc Pennington <hp@redhat.com>
8470 * bus/messagebus.in: remove pid file when stopping the
8471 message bus, since the bus won't have privileges to remove it
8474 2003-04-11 Havoc Pennington <hp@redhat.com>
8476 * bus/bus.c (bus_context_new): move credentials change after
8479 2003-04-11 Havoc Pennington <hp@pobox.com>
8481 * test/decode-gcov.c: add "below average functions" to the
8482 coverage report, and change how some of the code works.
8484 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
8485 not in the coverage stats.
8487 * test/test-service.c (main): use _dbus_verbose not fprintf in a
8488 couple places so running the test suite doesn't result in megaspam.
8490 2003-04-11 Havoc Pennington <hp@pobox.com>
8492 * bus/dispatch.c (check_existent_service_activation): accept a no
8493 memory error in a place we didn't before
8495 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
8496 in case the first one failed," since the test suite is less
8499 2003-04-10 Havoc Pennington <hp@pobox.com>
8501 * bus/dispatch.c (check_segfault_service_activation): add test
8502 for launching an executable that just crashes.
8504 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
8505 don't leave a million cores. We'll see how portable this is.
8507 2003-04-10 Havoc Pennington <hp@pobox.com>
8509 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
8510 the possible parent failures before we fork, so that we don't
8511 fail to create a babysitter after creating the child.
8513 * bus/activation.c (bus_activation_activate_service): kill child
8514 if we don't successfully complete the activation.
8516 2003-04-10 Havoc Pennington <hp@redhat.com>
8518 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
8519 the connection if it's disconnected
8521 * bus/activation.c (bus_activation_service_created): use new
8522 transaction features to roll back removal of pending activation if
8523 we don't successfully create the service after all. Don't remove
8524 pending activation if the function fails.
8526 * dbus/dbus-list.c (_dbus_list_insert_before_link)
8527 (_dbus_list_insert_after_link): new code to facilitate
8530 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
8531 new functionality, so we can preallocate the ability to insert
8534 * bus/connection.c (bus_transaction_add_cancel_hook): new function
8535 allowing us to put custom hooks in a transaction to be used for
8536 cancelling said transaction
8538 * doc/dbus-specification.sgml: add some discussion of secondary
8539 service owners, and disallow zero-length service names
8541 * bus/services.c (bus_registry_acquire_service): new function,
8542 splits out part of bus_driver_handle_acquire_service() and fixes
8543 a bug where we didn't remove the service doing the acquiring
8544 from the secondary queue if we failed to remove the current owner
8545 from the front of the queue.
8547 2003-04-10 Alexander Larsson <alexl@redhat.com>
8549 * doc/dbus-specification.sgml:
8550 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
8552 2003-04-10 Alexander Larsson <alexl@redhat.com>
8557 Added files to cvsignore
8559 * dbus/dbus-message.h:
8560 * dbus/dbus-message.c: (dbus_message_iter_get_named):
8561 Make get_named() take two out argument and return a boolean.
8562 (dbus_message_iter_get_args_valist):
8563 Update usage of get_named().
8564 (dbus_message_iter_append_byte):
8566 (dbus_message_iter_append_named)
8568 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
8571 2003-04-10 Alexander Larsson <alexl@redhat.com>
8573 * dbus/dbus-marshal.[ch]:
8574 Add array_type_pos argument to _dbus_marshal_validate_arg.
8575 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
8577 * dbus/dbus-message.[ch]:
8578 Multi-dimensional arrays have full type specification in the
8579 outermost array. Iter code re-arranged to handle this.
8580 Added some more iter tests.
8582 * doc/dbus-specification.sgml:
8585 Update new array encoding description.
8586 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
8588 * test/data/invalid-messages/array-with-mixed-types.message:
8589 * test/data/valid-messages/array-of-array-of-uint32.message:
8590 Change to the new array format.
8592 * test/data/invalid-messages/too-short-dict.message:
8595 * test/data/valid-messages/recursive-types.message:
8596 Fix up and extend test.
8598 2003-04-10 Havoc Pennington <hp@pobox.com>
8600 * bus/dispatch.c: lots of fixes
8602 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
8603 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
8604 that was crack, broke the test service.
8606 * dbus/dbus-transport.c (_dbus_transport_open): fix error
8607 handling to avoid piling up errors if we get a failure on the
8610 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
8611 pid in assertion failures.
8613 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
8614 to some fixed size of file descriptor array. Don't return TRUE
8615 anytime a timeout exists, that led to lots of busy loop silliness
8618 2003-04-09 Havoc Pennington <hp@redhat.com>
8620 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
8621 I'd checked this in earlier but hadn't.
8623 2003-04-09 Havoc Pennington <hp@redhat.com>
8625 * bus/dispatch.c (bus_dispatch_test): get a bit further through
8626 the activation test (man this is getting old!)
8628 2003-04-09 Havoc Pennington <hp@redhat.com>
8630 * test/test-utils.c: use dispatch status function to fix this up
8632 * bus/connection.c (connection_watch_callback): don't dispatch
8634 (connection_timeout_callback): don't dispatch from here
8635 (bus_connections_setup_connection): set the dispatch status function
8636 (bus_connection_disconnected): unset it
8638 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
8639 used to add a connection to be dispatched
8640 (_dbus_loop_iterate): do the dispatching at the end of each
8643 * dbus/dbus-connection.c
8644 (dbus_connection_set_dispatch_status_function): new function
8645 allowing us to fix up main loop usage
8646 (_dbus_connection_last_unref): free all the various function
8648 (dbus_connection_dispatch): call the DispatchStatusFunction
8649 whenever this function returns
8650 (dbus_connection_handle_watch): call DispatchStatusFunction
8651 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
8652 (reply_handler_timeout): call DispatchStatusFunction
8653 (dbus_connection_flush): call DispatchStatusFunction
8655 2003-04-09 Havoc Pennington <hp@redhat.com>
8657 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
8660 * bus/dispatch.c (check_service_activated): fix bug in test
8662 * dbus/dbus-mainloop.c (check_timeout): fix this up
8664 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
8665 verbose output so we can sort out output from different processes,
8666 e.g. in the activation case.
8668 2003-04-08 Colin Walters <walters@gnu.org>
8670 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
8672 (bus_context_new): Set it.
8673 (bus_context_unref): Use it to delete the pid file.
8675 2003-04-08 Havoc Pennington <hp@redhat.com>
8677 * test/data/invalid-messages/array-with-mixed-types.message:
8678 regression test that fails for the moment
8680 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
8681 tests for convenience
8683 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
8684 array of nil, it broke things.
8686 * test/data/invalid-messages/array-of-nil.message: regression test
8688 * test/data/valid-messages/array-of-array-of-uint32.message:
8689 happened to write this so added it to suite
8691 2003-04-08 Havoc Pennington <hp@redhat.com>
8693 * bus/driver.c (bus_driver_handle_acquire_service): init
8694 retval/reply before checking name
8696 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
8697 recursion depth argument
8699 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
8700 in the public struct for future extension
8702 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
8705 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
8708 * doc/dbus-specification.sgml: fix typo
8710 2003-04-08 Alexander Larsson <alexl@redhat.com>
8712 Implemented recursive types, named types and new-style iters
8715 * glib/test-thread-client.c: (thread_func):
8716 * glib/test-thread-server.c: (handle_test_message):
8717 * test/test-service.c: (handle_echo):
8726 * dbus/dbus-internals.c: (_dbus_type_to_string):
8727 Update for new types.
8729 * dbus/dbus-marshal.[ch]:
8730 Implement recursive types and the new marshalling format.
8731 Remove hardcoded dict marshalling.
8732 Marshal named types.
8734 * dbus/dbus-message-builder.c:
8736 Remove references to old types
8738 * dbus/dbus-message.[ch]:
8739 New non-refcounted iter API that supports recursive iters.
8740 Use iters for appending, including support for recursive
8742 Add byte and named type support.
8743 Update everything to new marshalling formats.
8744 Add tests for new API.
8746 * dbus/dbus-protocol.h:
8747 Remove old array types.
8748 Add types: BYTE, ARRAY, DICT, NAMED
8750 * dbus/dbus-string.c:
8751 * dbus/dbus-sysdeps.c:
8752 Make parse_double locale safe.
8754 * dbus/dbus-test-main.c:
8760 * doc/dbus-specification.sgml:
8763 * test/data/incomplete-messages/missing-body.message:
8764 * test/data/invalid-messages/bad-boolean.message:
8765 * test/data/invalid-messages/bad-boolean-array.message:
8766 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
8767 * test/data/invalid-messages/boolean-has-no-value.message-raw:
8768 * test/data/invalid-messages/too-short-dict.message:
8769 * test/data/valid-messages/dict-simple.message:
8770 * test/data/valid-messages/dict.message:
8771 * test/data/valid-messages/emptiness.message:
8772 * test/data/valid-messages/lots-of-arguments.message:
8773 * test/data/valid-messages/no-padding.message:
8774 * test/data/valid-messages/recursive-types.message:
8775 Add missing NAME fields
8776 Fix up dicts & arrays
8778 * test/data/invalid-messages/dict-with-nil-value.message:
8779 Removed, this is not invalid anymore.
8781 * test/data/valid-messages/recursive-types.message:
8782 Add new test for deeply recursive types.
8784 2003-04-07 Havoc Pennington <hp@pobox.com>
8786 * bus/driver.c (bus_driver_handle_acquire_service): return an
8787 error if you try to acquire a service that starts with ':'
8789 2003-04-07 Havoc Pennington <hp@redhat.com>
8791 * doc/dbus-specification.sgml: require that base service names
8792 start with ':' and that the base service is created/deleted
8793 as first and last things a connection does on the bus
8795 * bus/dispatch.c (check_existent_service_activation): lots more
8796 work on the activation test; it doesn't fully pass yet...
8798 * test/test-service.c (main): fix so we don't memleak the
8799 connection to the message bus
8800 (filter_func): accept a message asking us to exit
8802 2003-04-06 Havoc Pennington <hp@pobox.com>
8804 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
8807 * configure.in: fixes to Qt detection from Colin Walters
8809 * doc/Makefile.am: Only remove generated docbook dirs if they
8810 exist, from Colin Walters
8812 * dbus/dbus-bus.c: change how we set well-known connections to
8813 NULL, so that it works if a single connection is stored in
8814 two well-known array slots.
8816 * test/Makefile.am: remove a lot of stuff that isn't immediately
8817 useful, it's in CVS history if we want it.
8819 * test/test-service.c: use dbus-mainloop instead of that
8822 2003-04-06 Havoc Pennington <hp@pobox.com>
8824 * dbus/Makefile.am: split lists of sources into stuff that goes in
8825 the library, util functions that go in the lib and are also used
8826 elsewhere, and util functions that are used in tests/daemon but
8827 don't go in the lib.
8829 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
8830 here so it can be used in test binaries also
8832 2003-04-06 Havoc Pennington <hp@pobox.com>
8834 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
8835 here in the parent process, so we can return an error if it
8836 fails. Also, move some of the code into the child so the parent
8837 is less hosed if we fail midway through.
8839 * bus/bus.c (bus_context_new): move pidfile detection further up
8840 in the function, before we start overwriting sockets and such.
8842 * bus/messagebus.in: adjust this a bit, not sure if it will work.
8844 * configure.in: add --with-system-pid-file and --with-system-socket
8846 2003-04-06 Colin Walters <walters@verbum.org>
8848 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
8850 * bus/system.conf.in: Declare a pidfile.
8852 * bus/bus.c (bus_context_new): Test for an existing pid file, and
8853 create one (if appropriate).
8855 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
8856 (struct BusConfigParser) [pidfile]: New.
8857 (element_type_to_name, merge_included, start_busconfig_child)
8858 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
8859 (bus_config_parser_unref): Free it.
8860 (bus_config_parser_get_pidfile): New function.
8862 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
8864 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
8866 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
8868 * dbus/dbus-sysdeps.h: Prototype it.
8870 2003-04-06 Havoc Pennington <hp@pobox.com>
8872 * bus/bus.c (bus_context_new): print the address in here, rather
8873 than in main(), because we need to do it before forking the daemon
8875 * bus/dispatch.c (send_service_nonexistent_error): set the sender
8876 on the service nonexistent error
8878 * bus/driver.c (bus_driver_handle_acquire_service): set the
8879 sender on the AcquireService reply
8881 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
8882 server also listen on a UNIX socket so services can connect to it.
8884 2003-04-06 Havoc Pennington <hp@pobox.com>
8886 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
8887 so it detects deadlocks and also we actually init threads when
8890 2003-04-06 Havoc Pennington <hp@pobox.com>
8892 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
8893 save the domain socket name, and unlink it when we disconnect the
8894 server. Means that at least when we exit normally, we won't leave
8895 a bunch of junk in /tmp
8897 * dbus/dbus-transport-unix.c
8898 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
8899 memory management). (I was making a real change here but then
8902 2003-04-06 Havoc Pennington <hp@pobox.com>
8904 * bus/bus.c (bus_context_new): fix wrong handling of
8905 server_data_slot_unref() in the error case.
8907 * dbus/dbus-internals.h (_dbus_assert): change so it passes
8908 "(condition) != 0" to _dbus_real_assert so that
8909 "_dbus_assert (pointer)" doesn't cause a warning
8911 * bus/main.c (main): accept --print-address option to print out
8912 the message bus address
8914 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
8916 * dbus/dbus-transport.c (_dbus_transport_open): special error for
8917 "tmpdir" option to unix: address on client side
8919 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
8922 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
8923 we can use to create sockets in the test suite.
8925 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
8926 cleanly. To be used for testing.
8928 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
8930 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
8932 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
8933 handle trying to call this when there's no servers active
8935 2003-04-05 Havoc Pennington <hp@pobox.com>
8941 2003-04-05 Havoc Pennington <hp@pobox.com>
8943 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
8944 crash on startup. Need to get "try starting the daemon"
8945 in the test suite I guess. ;-)
8947 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
8948 tracked the number of open connections; it's better done in
8949 application-specific code as you want it to span all servers etc.
8951 2003-04-05 Havoc Pennington <hp@pobox.com>
8953 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
8954 patch from Colin Walters
8956 2003-04-05 Havoc Pennington <hp@pobox.com>
8958 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
8959 reality; in fact multiple mechanisms are allowed.
8961 * dbus/dbus-internals.c (_dbus_real_assert)
8962 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
8963 _dbus_assert_not_reached() into functions, so that they don't show
8964 up in basic block counts for test coverage, and don't use up as
8965 much disk space. Does mean slower execution speed though, so
8966 assumes --disable-asserts is the normal production case.
8968 2003-04-05 Havoc Pennington <hp@pobox.com>
8970 * test/Makefile.am (dist-hook): also dist *.in files
8976 2003-04-05 Havoc Pennington <hp@pobox.com>
8978 * dbus/dbus-string.c: docs warning
8980 * dbus/dbus-spawn.c: missing docs
8982 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
8984 2003-04-05 Havoc Pennington <hp@pobox.com>
8986 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
8989 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
8990 to -1 once we've reaped the babysitter
8991 (_dbus_babysitter_handle_watch): do as much work as we can, not
8994 * bus/activation.c: add code using DBusBabysitter so that we
8995 handle it when a service fails to start up properly.
8996 (bus_activation_service_created): don't remove the activation
8997 entries as we go, just let them get removed when we free the pending
8998 activation. Unref reply messages after sending them.
9000 2003-04-05 Havoc Pennington <hp@pobox.com>
9002 * test/decode-gcov.c (main): print per-directory stats in the report
9004 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
9006 2003-04-05 Havoc Pennington <hp@pobox.com>
9008 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
9010 * test/decode-gcov.c: hack up a little program to suck data
9011 out of gcov files. Yes this is sort of silly.
9013 * configure.in: define something in config.h and do an
9014 AM_CONDITIONAL when gcov is enabled
9016 2003-04-04 Havoc Pennington <hp@redhat.com>
9018 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
9019 return a "babysitter" object that is used to monitor the status of
9020 the spawned process and reap it when required.
9022 * test/test-segfault.c, test/test-exit.c,
9023 test/test-sleep-forever.c: binaries that do various lame things,
9024 used in the test suite.
9026 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
9028 2003-04-03 Havoc Pennington <hp@pobox.com>
9030 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
9031 in preparation for modifying it, dbus-sysdeps is getting
9034 2003-04-03 Havoc Pennington <hp@redhat.com>
9036 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
9039 * bus/*.[hc]: adapt to mainloop change
9041 2003-04-03 Havoc Pennington <hp@redhat.com>
9043 * bus/activation.c (load_directory): fix up memleaks
9044 (bus_activation_entry_free): free the entry
9046 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
9047 we get one from the message bus; fix memleaks.
9049 * dbus/dbus-message.c (dbus_set_error_from_message): new function
9051 2003-04-03 Havoc Pennington <hp@pobox.com>
9053 * bus/config-parser.c (bus_config_parser_unref): free
9054 list of mechanisms, bug discovered by test suite enhancements
9055 (putting system.conf and session.conf into suite)
9057 * test/Makefile.am, test/test-service.c: add placeholder for a
9058 test service that we'll activate as part of test suite. Doesn't
9061 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
9062 setting NULL value, and use system malloc not dbus_malloc()
9063 when we have unavoidable memleakage.
9065 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
9066 didn't work, and support DBUS_BUS_ACTIVATION.
9068 * bus/activation.c (child_setup): pass our well-known bus type to
9071 * bus/config-parser.c: support <type> to specify well-known type
9073 * doc/dbus-specification.sgml: document the env variables to
9074 locate well-known buses and find service activator
9076 2003-04-02 Havoc Pennington <hp@redhat.com>
9078 * test/Makefile.am (all-local): add a rule to copy tests to
9079 builddir, so we can have generated tests. Use this to remove the
9080 silly hack for testing system.conf and session.conf. Will use this
9081 shortly to generate .service files pointing to test binaries.
9083 2003-04-02 Havoc Pennington <hp@redhat.com>
9085 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
9086 current alloc and needed new length, not max of the doubled
9087 allocation and needed new length. Also, when building tests,
9088 don't do the double-allocation stuff, just realloc every time.
9090 2003-04-02 Havoc Pennington <hp@redhat.com>
9092 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
9094 (_dbus_string_get_dirname): new
9095 (_dbus_sysdeps_test): new
9096 (_dbus_directory_open): include dirnames in error messages
9098 * bus/config-parser.c: interpret <include> and <includedir> and
9099 <servicedir> relative to config file location if the given
9100 filename is not absolute.
9102 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
9104 2003-04-02 Havoc Pennington <hp@redhat.com>
9106 * bus/connection.c (bus_transaction_send_error_reply): set sender
9107 service for the error, and unref the reply on success
9109 * bus/activation.c: convert to use BusTransaction so OOM can be
9111 (bus_activation_service_created): set sender of the message
9113 2003-04-01 Havoc Pennington <hp@redhat.com>
9115 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
9116 <includedir> (at least mostly)
9118 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
9119 first, then the user ID
9121 2003-04-01 Havoc Pennington <hp@pobox.com>
9123 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
9126 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
9128 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
9130 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
9131 socket 0777, and unlink any existing socket.
9133 * bus/bus.c (bus_context_new): change our UID/GID and fork if
9134 the configuration file so specifies; set up auth mechanism
9137 * bus/config-parser.c (bus_config_parser_content): add support
9138 for <fork> option and fill in code for <auth>
9140 * bus/system.conf.in: add <fork/> to default configuration,
9141 and limit auth mechanisms to EXTERNAL
9143 * doc/config-file.txt (Elements): add <fork>
9145 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
9146 (_dbus_change_identity): new function
9148 2003-03-31 Havoc Pennington <hp@redhat.com>
9150 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
9151 (_dbus_listen_unix_socket): fix off-by-one error in null
9152 termination spotted by Nalin
9154 2003-03-31 Havoc Pennington <hp@redhat.com>
9156 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
9157 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
9158 having a real home directory available.
9160 2003-03-31 Havoc Pennington <hp@redhat.com>
9162 * bus/Makefile.am (install-data-hook): create /var/run/dbus
9164 * bus/messagebus.in: add init script for Red Hat /etc/init.d
9166 * configure.in: add support for specifying a style of init script
9169 2003-03-31 Havoc Pennington <hp@redhat.com>
9171 Fix some annoying DBusString API and fix all affected code.
9173 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
9175 (_dbus_string_get_data): change to return string instead of using
9177 (_dbus_string_get_const_data): ditto
9178 (_dbus_string_get_data_len): ditto
9179 (_dbus_string_get_const_data_len): ditto
9181 2003-03-31 Havoc Pennington <hp@redhat.com>
9183 * bus/main.c (main): fix up the command line arguments to be nicer
9185 2003-03-31 Havoc Pennington <hp@redhat.com>
9187 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
9188 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
9189 final location that lands in the config file
9191 * bus/config-loader-expat.c (bus_config_load): fix type of
9194 * doc/TODO: remove TODO item for dbus_bus_get()
9196 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
9198 2003-03-31 Havoc Pennington <hp@pobox.com>
9200 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
9201 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
9202 argument since they are always client side
9204 * dbus/dbus-server.c (dbus_server_get_address): new function
9206 * bus/main.c (main): take the configuration file as an argument.
9208 * test/data/valid-config-files/debug-allow-all.conf: new file to
9209 use with dispatch.c tests for example
9211 * bus/test-main.c (main): require test data dir
9213 * bus/bus.c (bus_context_new): change this to take a
9214 configuration file name as argument
9216 * doc/config-file.txt (Elements): add <servicedir>
9218 * bus/system.conf, bus/session.conf: new files
9220 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
9221 well-known socket if none set
9223 * configure.in: create system.conf and session.conf
9225 2003-03-30 Havoc Pennington <hp@pobox.com>
9227 * bus/config-parser.c: hacking
9229 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
9230 to shut down, since it could cause weirdness with the DBusList
9233 * dbus/dbus-list.c (_dbus_list_test): add tests for the
9234 link-oriented stack routines
9235 (alloc_link): free the mempool if the first alloc from it fails
9237 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
9239 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
9241 (_dbus_string_skip_white): new
9243 * doc/config-file.txt (Elements): add <includedir>
9245 2003-03-28 Havoc Pennington <hp@pobox.com>
9247 * dbus/dbus-string.c (_dbus_string_copy_data_len)
9248 (_dbus_string_copy_data): new functions
9250 2003-03-28 Anders Carlsson <andersca@codefactory.se>
9252 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
9256 * dbus/dbus-memory.c:
9259 2003-03-28 Havoc Pennington <hp@pobox.com>
9261 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
9262 I think it may have just been superstition. Not sure.
9264 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
9265 failures that were not being handled.
9267 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
9269 * dbus/dbus-memory.c: add ability to set number of mallocs in a
9270 row that will fail on out-of-memory.
9272 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
9273 function for testing out-of-memory handling.
9275 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
9276 allocation functions, they do map exactly to the expat ones.
9278 2003-03-27 Havoc Pennington <hp@redhat.com>
9280 * bus/config-loader-libxml.c (bus_config_load): add another error
9283 2003-03-26 Anders Carlsson <andersca@codefactory.se>
9286 Add note about automatic service activation.
9288 * doc/dbus-specification.sgml:
9289 Rename the specification and clarify a few things.
9291 2003-03-26 Anders Carlsson <andersca@codefactory.se>
9294 * dbus/dbus-address.c:
9296 * dbus/dbus-marshal.c:
9297 * dbus/dbus-server-debug-pipe.c:
9298 * dbus/dbus-transport-unix.c:
9299 Fix documentation warnings.
9301 2003-03-26 Havoc Pennington <hp@pobox.com>
9303 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
9304 after every test so it's quick and easy to see which leaked, and
9305 so we test multiple dbus_shutdown() calls
9307 * configure.in: change configure.in XML stuff to also support
9310 * config-loader-libxml.c: some hacking
9312 * config-loader-expat.c: some hacking
9314 * config-parser.c: some hacking, plus tests
9316 2003-03-25 Havoc Pennington <hp@redhat.com>
9318 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
9320 * configure.in: add --with-xml option to specify XML library,
9321 right now only libxml is supported.
9323 * bus/config-loader-libxml.c, config-parser.c: sync some minor
9324 nonworking code between home and work, still just stubs
9326 2003-03-24 Havoc Pennington <hp@redhat.com>
9328 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
9331 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
9332 NULL argument for "message" if the error is a well-known one,
9333 fill in a generic message in this case.
9335 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
9338 * bus/test.c (bus_test_flush_bus): add
9340 * bus/policy.c (bus_policy_test): test code stub
9342 2003-03-24 Havoc Pennington <hp@pobox.com>
9344 * bus/connection.c (bus_connections_setup_connection): set up
9345 the "can this user connect" function, but it always returns
9346 TRUE until we have a config file parser so we can have a config
9347 file that allows connections.
9349 2003-03-23 Havoc Pennington <hp@pobox.com>
9351 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
9352 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
9353 the mutex, so we can check for proper memory management
9356 * dbus/dbus-dataslot.c: remove the mutex from
9357 DBusDataSlotAllocator and lock it manually when using it,
9358 to simplify fitting it into the global slots framework.
9360 * dbus/dbus-threads.c (init_static_locks): rework how we're
9361 handling global locks so they are easily shut down.
9363 * bus/policy.c (bus_policy_append_rule): fix
9365 * bus/test-main.c (main): check for memleaks
9367 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
9368 test suite check for memleaks
9370 * dbus/dbus-memory.c: add support in test mode for tracking
9371 number of outstanding blocks
9373 2003-03-23 Havoc Pennington <hp@pobox.com>
9375 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
9378 * dbus/dbus-hash.h: add ULONG hash keys
9380 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
9381 (_dbus_get_group_id): new function
9383 2003-03-20 Havoc Pennington <hp@redhat.com>
9385 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
9387 (dbus_connection_get_unix_user): new function
9389 2003-03-20 Havoc Pennington <hp@pobox.com>
9391 * bus/connection.c (bus_connection_send_oom_error): assert that
9392 message has a sender
9393 (connection_execute_transaction): ditto
9394 (bus_connection_preallocate_oom_error): fix to set the sender, and
9395 set recipient to the destination service, not the bus driver
9397 * bus/policy.c: hacking
9399 * dbus/dbus-message.c (dbus_message_service_is): new function
9400 (dbus_message_sender_is): new
9402 2003-03-19 Havoc Pennington <hp@redhat.com>
9404 * bus/policy.c: start sketching code for policy restrictions on
9405 what connections can do.
9407 2003-03-18 Havoc Pennington <hp@redhat.com>
9409 * doc/TODO: some notes on high-level todo items. Little nitpick
9410 stuff is all in @todo, so no need to add it here.
9412 * doc/config-file.txt: some notes on how config file might look
9414 2003-03-18 Anders Carlsson <andersca@codefactory.se>
9420 2003-03-17 Havoc Pennington <hp@redhat.com>
9422 * dbus/dbus-internals.h: add gcc attributes so that
9423 our printf-style functions warn on bad arguments to
9426 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
9429 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
9432 2003-03-17 Havoc Pennington <hp@redhat.com>
9434 * bus/test-main.c (main): make it print something as it runs
9435 so make check doesn't look stuck
9437 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
9438 from CVS, now obsolete
9440 2003-03-17 Anders Carlsson <andersca@codefactory.se>
9442 * bus/dispatch.c: (bus_dispatch):
9443 Refetch the service name since it may have been reallocated
9444 when dbus_message_set_sender was called.
9446 * dbus/dbus-sysdeps.c: (_dbus_accept):
9447 Add address and address length variables and use them to stop
9448 valgrind from complaining.
9450 2003-03-17 Havoc Pennington <hp@pobox.com>
9452 All tests pass, no memleaks, no valgrind complaints.
9454 * bus/test.c: refcount handler_slot
9456 * bus/connection.c (bus_connections_new): refcount
9457 connection_data_slot
9459 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
9460 bytes so that auth scripts pass.
9462 * bus/dispatch.c: init message_handler_slot so it gets allocated
9465 * bus/dispatch.c (message_handler_slot_ref): fix memleak
9467 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
9468 dealloc server_pipe_hash when no longer used for benefit of
9471 * dbus/dbus-auth.c (process_command): memleak fix
9473 * bus/dispatch.c (check_hello_message): memleak fix
9475 2003-03-16 Havoc Pennington <hp@pobox.com>
9477 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
9479 2003-03-17 Anders Carlsson <andersca@codefactory.se>
9481 * bus/activation.c (bus_activation_activate_service): Append
9482 the pending activation entry to the list of pending activations.
9484 2003-03-16 Havoc Pennington <hp@pobox.com>
9486 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
9489 * dbus/dbus-address.c (create_entry): fix OOM handling when
9490 failing to alloc entry->method
9492 2003-03-16 Havoc Pennington <hp@pobox.com>
9494 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
9497 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
9498 add some missing dbus_set_result
9500 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
9501 alloc the DBusMessageHandler
9503 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
9504 the transport here, since we call this from the finalizer; it
9505 resulted in a double-finalize.
9507 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
9508 where we tried to use transport->connection that was NULL,
9509 happened when transport was disconnected early on due to OOM
9511 * bus/*.c: adapt to handle OOM for watches/timeouts
9513 * dbus/dbus-transport-unix.c: port to handle OOM during
9516 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
9517 reference to unused bytes instead of a copy
9519 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
9522 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
9525 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
9528 2003-03-16 Anders Carlsson <andersca@codefactory.se>
9530 * doc/dbus-specification.sgml:
9531 Document reply message for ActivateService.
9533 2003-03-16 Anders Carlsson <andersca@codefactory.se>
9535 * bus/activation.c: (bus_pending_activation_entry_free),
9536 (bus_pending_activation_free), (bus_activation_new),
9537 (bus_activation_unref), (bus_activation_service_created),
9538 (bus_activation_activate_service):
9540 * bus/bus.c: (bus_context_new):
9541 * bus/desktop-file.c: (new_section):
9542 * bus/driver.c: (bus_driver_send_service_deleted),
9543 (bus_driver_handle_activate_service):
9544 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
9546 * dbus/dbus-connection.c:
9547 (dbus_connection_send_with_reply_and_block):
9548 * dbus/dbus-message.c: (dbus_message_append_args_valist):
9549 * dbus/dbus-protocol.h:
9550 Make activation work better. Now pending activations will be queued
9551 and the daemon won't try to activate services that are already registered.
9553 2003-03-16 Havoc Pennington <hp@pobox.com>
9555 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
9558 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
9559 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
9561 2003-03-16 Havoc Pennington <hp@pobox.com>
9563 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
9564 this. always run the test suite before commit...
9566 * bus/*: adapt to DBusConnection API changes
9568 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
9569 requires renaming stuff to avoid dbus_connection_dispatch name
9572 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
9575 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
9576 separate from _dbus_message_loader_return_buffer()
9578 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
9579 this, because it's now always broken to use; the number of
9580 messages in queue vs. the number still buffered by the message
9581 loader is undefined/meaningless. Should use
9582 dbus_connection_get_dispatch_state().
9583 (dbus_connection_dispatch): rename from
9584 dbus_connection_dispatch_message
9586 2003-03-16 Havoc Pennington <hp@pobox.com>
9588 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
9591 2003-03-16 Anders Carlsson <andersca@codefactory.se>
9593 * dbus/dbus-connection.c:
9594 (dbus_connection_send_with_reply_and_block):
9595 Decrease connection->n_incoming when removing an entry
9597 * dbus/dbus-dict.c: (dbus_dict_entry_free),
9598 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
9599 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
9600 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
9601 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
9602 (dbus_dict_get_byte_array):
9603 Handle NULL arrays and strings. Also add support for byte arrays.
9605 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
9606 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
9607 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
9608 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
9609 (_dbus_demarshal_dict), (demarshal_and_validate_len),
9610 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
9611 * dbus/dbus-marshal.h:
9612 Add support for marshalling and demarshalling empty arrays and strings.
9614 * dbus/dbus-message.c: (dbus_message_append_args_valist),
9615 (dbus_message_append_string_array),
9616 (dbus_message_iter_get_boolean),
9617 (dbus_message_iter_get_boolean_array),
9618 (dbus_message_iter_get_int32_array),
9619 (dbus_message_iter_get_uint32_array),
9620 (dbus_message_iter_get_double_array),
9621 (dbus_message_iter_get_byte_array),
9622 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
9623 (check_message_handling):
9624 Add support for getting empty arrays and dicts.
9626 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
9627 Don't do any validation at all for now, that's better than just checking
9630 * test/data/valid-messages/emptiness.message:
9631 New test message with lots of empty arrays.
9633 2003-03-16 Havoc Pennington <hp@pobox.com>
9635 * dbus/dbus-connection.c
9636 (_dbus_connection_queue_received_message_link): new function that
9637 can't fail due to OOM
9639 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
9640 new function pops a message together with a list link
9643 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
9644 message queuing functions to avoid needing to alloc memory
9646 2003-03-16 Havoc Pennington <hp@pobox.com>
9648 Oops - test code was only testing failure of around 30 of the
9649 mallocs in the test path, but it turns out there are 500+
9650 mallocs. I believe this was due to misguided linking setup such
9651 that there was one copy of dbus_malloc etc. in the daemon and one
9652 in the shared lib, and only daemon mallocs were tested. In any
9653 case, the test case now tests all 500+ mallocs, and doesn't pass
9654 yet, though there are lots of fixes in this patch.
9656 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
9657 this so that it doesn't need to allocate memory, since it
9658 has no way of indicating failure due to OOM (and would be
9659 annoying if it did).
9661 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
9663 * bus/Makefile.am: rearrange to create two self-contained
9664 libraries, to avoid having libraries with overlapping symbols.
9665 that was resulting in weirdness, e.g. I'm pretty sure there
9666 were two copies of global static variables.
9668 * dbus/dbus-internals.c: move the malloc debug stuff to
9671 * dbus/dbus-list.c (free_link): free list mempool if it becomes
9674 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
9676 * dbus/dbus-address.c (dbus_parse_address): free list nodes
9679 * bus/dispatch.c (bus_dispatch_add_connection): free
9680 message_handler_slot when no longer using it, so
9681 memory leak checkers are happy for the test suite.
9683 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
9685 * bus/bus.c (new_connection_callback): disconnect in here if
9686 bus_connections_setup_connection fails.
9688 * bus/connection.c (bus_connections_unref): fix to free the
9690 (bus_connections_setup_connection): if this fails, don't
9691 disconnect the connection, just be sure there are no side
9694 * dbus/dbus-string.c (undo_alignment): unbreak this
9696 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
9698 (_dbus_auth_new): fix the order in which we free strings
9701 * bus/connection.c (bus_connection_disconnected): fix to
9702 not send ServiceDeleted multiple times in case of memory
9705 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
9706 get the base service name
9707 (dbus_bus_register_client): don't return base service name,
9708 instead store it on the DBusConnection and have an accessor
9710 (dbus_bus_register_client): rename dbus_bus_register()
9712 * bus/dispatch.c (check_hello_message): verify that other
9713 connections on the bus also got the correct results, not
9714 just the one sending hello
9716 2003-03-15 Havoc Pennington <hp@pobox.com>
9718 Make it pass the Hello handling test including all OOM codepaths.
9719 Now to do other messages...
9721 * bus/services.c (bus_service_remove_owner): fix crash when
9722 removing owner from an empty list of owners
9723 (bus_registry_ensure): don't leave service in the list of
9724 a connection's owned services if we fail to put the service
9727 * bus/connection.c (bus_connection_preallocate_oom_error): set
9728 error flag on the OOM error.
9730 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
9731 handle _dbus_transport_set_connection failure
9733 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
9734 to create watches up front and simply enable/disable them as
9736 (unix_connection_set): this can now fail on OOM
9738 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
9739 of enabling/disabling a watch or timeout.
9741 * bus/loop.c (bus_loop_iterate): don't touch disabled
9744 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
9746 2003-03-15 Havoc Pennington <hp@pobox.com>
9748 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
9749 write useful test code, after all that futzing around ;-)
9751 Test does not yet pass because we can't handle OOM in
9752 _dbus_transport_messages_pending (basically,
9753 dbus_connection_preallocate_send() does not prealloc the write
9754 watch). To fix this, I think we need to add new stuff to
9755 set_watch_functions, namely a SetEnabled function so we can alloc
9756 the watch earlier, then enable it later.
9758 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
9759 dbus-memory.c to the convenience lib
9761 * bus/test.c: rename some static functions to keep them clearly
9762 distinct from stuff in connection.c. Handle client disconnection.
9764 2003-03-14 Havoc Pennington <hp@pobox.com>
9766 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
9767 transport, tests more of the real codepath. Set up clients
9768 with bus_setup_debug_client.
9770 * bus/test.c (bus_setup_debug_client): function to set up debug
9771 "clients" on the main loop
9773 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
9776 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
9779 * dbus/dbus-server-debug.c: support a debug server based on pipes
9781 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
9782 (_dbus_close): new function
9784 * configure.in: check for socketpair
9786 2003-03-14 Havoc Pennington <hp@redhat.com>
9788 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
9791 * dbus/dbus-transport-debug.c: rework this a good bit to be
9792 less complicated. hopefully still works.
9794 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
9797 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
9800 * dbus/dbus-message.c (dbus_message_copy): rename from
9801 dbus_message_new_from_message, fix it up to copy
9802 all the message fields, add test case
9804 * bus/dispatch.c (bus_dispatch_test): add some more test code,
9805 not quite passing yet
9807 2003-03-14 Havoc Pennington <hp@pobox.com>
9809 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
9810 until no work remains" in test code. (the large diff here
9811 is just code movement, no actual changes)
9813 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
9814 1, no point waiting around for test code.
9815 (_dbus_server_debug_accept_transport): unref the timeout
9816 after adding it (right?)
9818 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
9820 2003-03-13 Havoc Pennington <hp@redhat.com>
9822 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
9825 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
9828 * dbus/dbus-connection.h: Make AddWatchFunction and
9829 AddTimeoutFunction return a bool so they can fail on out-of-memory
9831 * bus/bus.c (bus_context_new): set up timeout handlers
9833 * bus/connection.c (bus_connections_setup_connection): set up
9836 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
9839 * bus/bus.c (bus_context_new): adapt to changes
9841 * bus/connection.c: adapt to changes
9843 * test/watch.c: adapt to DBusWatch changes
9845 * bus/dispatch.c (bus_dispatch_test): started adding this but
9848 2003-03-14 Anders Carlsson <andersca@codefactory.se>
9850 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
9852 2003-03-13 Havoc Pennington <hp@pobox.com>
9854 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
9855 set up a test framework as for the library
9857 2003-03-12 Havoc Pennington <hp@pobox.com>
9859 Throughout: purge global variables, introduce BusActivation,
9860 BusConnections, BusRegistry, etc. objects instead.
9862 * bus/bus.h, bus/bus.c: introduce BusContext as a global
9865 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
9866 going to redo this a bit differently I think
9868 2003-03-12 Havoc Pennington <hp@redhat.com>
9870 Mega-patch that gets the message bus daemon initially handling
9871 out-of-memory. Work still needed. Also lots of random
9872 moving stuff to DBusError instead of ResultCode.
9874 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
9876 * dbus/dbus-connection.c
9877 (dbus_connection_send_with_reply_and_block): use DBusError
9879 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
9882 * dbus/dbus-connection.c (dbus_connection_send): drop the result
9883 code here, as the only failure possible is OOM.
9885 * bus/connection.c (bus_connection_disconnect):
9886 rename bus_connection_disconnected as it's a notification only
9888 * bus/driver.c (bus_driver_handle_acquire_service): don't free
9889 "name" on get_args failure, should be done by get_args;
9890 don't disconnect client for bad args, just return an error.
9891 (bus_driver_handle_service_exists): ditto
9893 * bus/services.c (bus_services_list): NULL-terminate returned array
9895 * bus/driver.c (bus_driver_send_service_lost)
9896 (bus_driver_send_service_acquired): send messages from driver to a
9897 specific client to the client's unique name, not to the broadcast
9900 * dbus/dbus-message.c (decode_header_data): reject messages that
9901 contain no name field
9902 (_dbus_message_get_client_serial): rename to
9903 dbus_message_get_serial and make public
9904 (_dbus_message_set_serial): rename from set_client_serial
9905 (_dbus_message_set_reply_serial): make public
9906 (_dbus_message_get_reply_serial): make public
9908 * bus/connection.c (bus_connection_foreach): allow stopping
9909 iteration by returning FALSE from foreach function.
9911 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
9912 (dbus_connection_free_preallocated_send)
9913 (dbus_connection_preallocate_send): new API for sending a message
9914 without possibility of malloc failure.
9915 (dbus_connection_send_message): rename to just
9916 dbus_connection_send (and same for whole function family)
9918 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
9920 * dbus/dbus-sysdeps.c (_dbus_exit): new function
9922 * bus/activation.c: handle/return errors
9924 * dbus/dbus-errors.h: add more DBUS_ERROR #define
9926 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
9927 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
9928 (_dbus_result_from_errno): move to this file
9930 2003-03-10 Anders Carlsson <andersca@codefactory.se>
9932 * dbus/dbus-marshal.c:
9933 (_dbus_marshal_set_string):
9934 Take a length argument so we can marshal the correct string
9937 (_dbus_marshal_dict), (_dbus_demarshal_dict),
9938 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
9939 (_dbus_marshal_test):
9940 * dbus/dbus-marshal.h:
9941 Add support for marshalling and demarshalling dicts.
9943 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
9944 Add support for TYPE DICT.
9946 * dbus/dbus-message.c: (set_string_field):
9947 Adjust header padding.
9949 (dbus_message_append_args_valist), (dbus_message_append_dict),
9950 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
9951 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
9952 (check_message_handling), (check_have_valid_message):
9953 * dbus/dbus-message.h:
9954 Add functions for setting and getting dicts.
9956 * dbus/dbus-protocol.h:
9962 * doc/dbus-specification.sgml:
9963 Add information about how dicts are marshalled.
9965 * test/data/invalid-messages/dict-with-nil-value.message:
9966 * test/data/invalid-messages/too-short-dict.message:
9967 * test/data/valid-messages/dict-simple.message:
9968 * test/data/valid-messages/dict.message:
9969 Add sample messages containing dicts.
9971 2003-03-08 Anders Carlsson <andersca@codefactory.se>
9973 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
9975 2003-03-07 Anders Carlsson <andersca@codefactory.se>
9978 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
9979 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
9980 (dbus_dict_set_int32), (dbus_dict_set_uint32),
9981 (dbus_dict_set_double), (dbus_dict_set_string),
9982 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
9983 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
9984 (dbus_dict_set_string_array), (_dbus_dict_test):
9986 Fix according to comments from Havoc.
9988 2003-03-06 Michael Meeks <michael@server.home>
9990 * configure.in: if we don't have kde-config, disable have_qt.
9992 2003-03-07 Anders Carlsson <andersca@codefactory.se>
9997 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
9998 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
9999 (dbus_dict_remove), (dbus_dict_get_value_type),
10000 (dbus_dict_get_keys), (dbus_dict_put_boolean),
10001 (dbus_dict_put_int32), (dbus_dict_put_uint32),
10002 (dbus_dict_put_double), (dbus_dict_put_string),
10003 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
10004 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
10005 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
10006 (dbus_dict_get_int32), (dbus_dict_get_uint32),
10007 (dbus_dict_get_double), (dbus_dict_get_string),
10008 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
10009 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
10010 (dbus_dict_get_string_array), (_dbus_dict_test):
10011 * dbus/dbus-dict.h:
10012 Add DBusDict implementation
10014 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
10015 * dbus/dbus-test.h:
10016 Add _dbus_dict_test
10018 2003-03-04 Havoc Pennington <hp@pobox.com>
10020 * test/data/auth/*: adapt to changes
10022 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
10023 USERID_BASE64 and change USERNAME_BASE64 to put in username not
10026 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
10027 more stuff from being in a context name, to make the protocol
10028 simpler to deal with
10030 * dbus/dbus-errors.c (dbus_error_has_name): new function
10031 (dbus_error_is_set): new function
10033 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
10034 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
10036 * dbus/dbus-connection.c (dbus_connection_flush): also read
10037 messages during a flush operation
10039 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
10041 2003-03-05 Anders Carlsson <andersca@codefactory.se>
10043 * configure.in: Check for gethostbyname on Solaris.
10045 * dbus/dbus-transport.c: (_dbus_transport_open):
10046 Remove duplicate "tcp" entry.
10048 * doc/dbus-specification.sgml:
10049 Clarify some things.
10051 2003-03-05 Anders Carlsson <andersca@codefactory.se>
10053 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
10054 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
10055 (_dbus_keyring_test):
10056 * dbus/dbus-md5.c: (_dbus_md5_compute):
10057 * dbus/dbus-sha.c: (_dbus_sha_compute):
10060 2003-03-05 Anders Carlsson <andersca@codefactory.se>
10062 * README: Add some things.
10064 2003-03-04 Anders Carlsson <andersca@codefactory.se>
10066 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
10067 after case DBUS_TYPE_BOOELAN.
10069 2003-03-02 Havoc Pennington <hp@pobox.com>
10071 * test/break-loader.c (randomly_set_extreme_ints): add test that
10072 sets really huge and small integers
10074 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
10075 that length of boolean array fits in the string, and that
10076 string has room for boolean value in single-bool case.
10078 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
10079 optional value to "ALIGN" command which is what to fill the
10082 * test/data/valid-messages/no-padding.message: add regression
10083 test for the message padding problem
10085 2003-03-02 Havoc Pennington <hp@pobox.com>
10087 * dbus/dbus-message.c (decode_header_data): fix to always init
10088 message_padding, from Benjamin Dauvergne
10090 2003-03-02 Havoc Pennington <hp@pobox.com>
10092 * configure.in: 0.5
10096 2003-03-01 Joe Shaw <joe@assbarn.com>
10098 * configure.in: Check for "struct cmsgcred" and try to access its
10099 members for BSD-like unices.
10101 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
10102 _dbus_read_credentials_unix_socket().
10103 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
10104 read() for reading the credential byte off the unix socket. Use
10105 struct cmsgcred on systems that support it.
10107 2003-02-27 Alexander Larsson <alexl@redhat.com>
10109 * glib/Makefile.am:
10111 Make gthreads-2.0 dependency optional. Don't build thread test if
10114 2003-02-27 Havoc Pennington <hp@pobox.com>
10116 * dbus/dbus-connection.c
10117 (dbus_connection_send_message_with_reply_and_block): fix doh!
10118 doh! doh! bug that resulted in never removing a reply from the
10119 queue, no wonder we called get_reply_serial so much ;-)
10121 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
10122 and client serial instead of demarshaling them every time
10124 2003-02-27 Havoc Pennington <hp@pobox.com>
10126 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
10127 more inlined, using dbus-string-private.h, speeds things up
10130 * dbus/dbus-string.c (_dbus_string_free): apply align offset
10131 when freeing the string
10132 (_dbus_string_steal_data): fix for align offset
10133 (undo_alignment): new function
10135 2003-02-26 Havoc Pennington <hp@redhat.com>
10137 All kinds of audit fixes from Owen, plus initial attempt to
10138 handle unaligned memory returned from malloc.
10140 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
10141 leave room for align_offset and nul byte
10142 (fixup_alignment): function to track an align_offset and
10143 ensure real->str is aligned
10144 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
10145 to allow a nul byte plus align offset
10146 (_dbus_string_lock): fix overflow issue
10147 (_dbus_string_init_const_len): add assertions on sanity of len,
10148 assign allocated to be ALLOCATION_PADDING larger than len
10149 (set_length): fixup the overflow handling
10150 (_dbus_string_get_data_len): fix overflow in assertion
10151 (open_gap): detect overflow in size of gap to be opened
10152 (_dbus_string_lengthen): add overflow check
10153 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
10154 (_dbus_string_append): add overflow check
10155 (_dbus_string_append_unichar): overflow
10156 (_dbus_string_delete): fix overflow in assertion
10157 (_dbus_string_copy_len): overflow in assertion
10158 (_dbus_string_replace_len): overflows in assertions
10159 (_dbus_string_find): change to implement in terms of
10160 _dbus_string_find_to
10161 (_dbus_string_find_to): assorted fixage
10162 (_dbus_string_equal_c_str): assert c_str != NULL,
10163 fix logic so the function works
10164 (_dbus_string_ends_with_c_str): fix overflow thingy
10165 (_dbus_string_base64_encode): overflow fix
10166 (_dbus_string_validate_ascii): overflow
10167 (_dbus_string_validate_nul): overflow
10169 2003-02-26 Havoc Pennington <hp@redhat.com>
10171 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
10173 2003-02-26 Alexander Larsson <alexl@redhat.com>
10176 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
10178 * dbus/dbus-connection.c:
10179 * dbus/dbus-connection.h:
10180 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
10181 Add dbus_connection_set_wakeup_main_function and use it when queueing
10182 incoming and outgoing messages.
10185 * dbus/dbus-dataslot.c:
10186 Threadsafe usage of DBusDataSlotAllocator
10188 * dbus/dbus-message.c: (dbus_message_get_args_iter):
10191 * dbus/dbus-server-unix.c:
10194 * glib/dbus-gmain.c:
10195 Implement the new wakeup functions for glib.
10197 * glib/Makefile.am:
10198 * glib/test-thread-client.c:
10199 * glib/test-thread-server.c:
10200 * glib/test-thread.h:
10201 Initial cut at some thread test code. Not really done yet.
10203 2003-02-26 Havoc Pennington <hp@pobox.com>
10205 * dbus/dbus-connection.c
10206 (dbus_connection_send_message_with_reply_and_block): fix crash
10207 where we ref'd the outgoing message instead of the returned reply
10209 * dbus/dbus-transport-unix.c (do_authentication): check read watch
10210 at the end of this function, so if we didn't need to read for
10211 authentication, we reinstall it for receiving messages
10213 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
10214 a NULL sender for peer-to-peer case
10216 * dbus/dbus-transport-unix.c (check_read_watch): handle
10217 !authenticated case correctly
10219 * glib/dbus-gmain.c: add support for DBusServer
10221 * dbus/dbus-server.c: add data slot support
10223 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
10224 return values and handle errors
10226 * dbus/dbus-dataslot.c: factor out the data slot stuff from
10229 * Doxyfile.in (INPUT): add glib subdir
10231 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
10232 setup_with_g_main instead of hookup_with_g_main; write docs
10234 2003-02-24 Anders Carlsson <andersca@codefactory.se>
10236 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
10237 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10238 * dbus/dbus-message.c: (dbus_message_append_boolean),
10239 (dbus_message_append_boolean_array),
10240 (dbus_message_get_args_valist), (_dbus_message_test):
10241 * dbus/dbus-message.h:
10242 * doc/dbus-specification.sgml:
10243 Various fixes as pointed out by Havoc.
10245 * test/data/invalid-messages/bad-boolean-array.message:
10246 * test/data/invalid-messages/bad-boolean.message:
10247 Add invalid boolean value test cases.
10249 2003-02-24 Anders Carlsson <andersca@codefactory.se>
10251 * dbus/dbus-internals.c: (_dbus_type_to_string):
10252 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
10253 (_dbus_marshal_validate_arg):
10254 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10255 * dbus/dbus-message.c: (dbus_message_append_args_valist),
10256 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
10257 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
10258 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
10259 (dbus_message_iter_get_double),
10260 (dbus_message_iter_get_boolean_array), (message_iter_test):
10261 * dbus/dbus-message.h:
10262 * dbus/dbus-protocol.h:
10263 * doc/dbus-specification.sgml:
10264 * test/data/valid-messages/lots-of-arguments.message:
10265 Add support for boolean and boolean array types.
10267 2003-02-23 Havoc Pennington <hp@pobox.com>
10269 * dbus/dbus-keyring.c: finish most of this implementation and
10272 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
10273 these barf if the error isn't cleared to NULL
10275 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
10276 (_dbus_create_directory): new function
10278 * dbus/dbus-errors.c (dbus_set_error): fix warning
10280 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
10281 (_dbus_string_hex_decode): new function
10282 (test_hex_roundtrip): test code
10284 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
10286 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
10288 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
10289 the save-to-temp/rename trick to atomically write the new file
10290 (_dbus_string_parse_uint): new function
10292 2003-02-22 Havoc Pennington <hp@pobox.com>
10294 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
10296 2003-02-22 Havoc Pennington <hp@pobox.com>
10298 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
10299 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
10301 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
10303 * dbus/test/data/sha-1: add US government test suite for SHA-1
10305 2003-02-21 Anders Carlsson <andersca@codefactory.se>
10307 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
10308 Make string arrays NULL-terminated.
10310 * dbus/dbus-memory.c: (dbus_free_string_array):
10311 * dbus/dbus-memory.h:
10312 New function for freeing NULL-terminated string arrays.
10314 * dbus/dbus-message-builder.c: (append_quoted_string),
10315 (_dbus_message_data_load):
10316 Add support for array types.
10318 * dbus/dbus-message.c: (check_message_handling):
10319 Add more types as test cases.
10321 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
10322 (_dbus_string_parse_double):
10323 Add the start offset to the end offset.
10325 * test/data/valid-messages/lots-of-arguments.message:
10326 New test message with lots of arguments.
10328 2003-02-21 Anders Carlsson <andersca@codefactory.se>
10330 * dbus/dbus-message.c: (dbus_message_append_nil),
10331 (dbus_message_append_int32), (dbus_message_append_uint32),
10332 (dbus_message_append_double), (dbus_message_append_string),
10333 (dbus_message_append_int32_array),
10334 (dbus_message_append_uint32_array),
10335 (dbus_message_append_double_array),
10336 (dbus_message_append_byte_array),
10337 (dbus_message_append_string_array):
10338 Fix all out-of-memory handling in these functions.
10340 2003-02-21 Anders Carlsson <andersca@codefactory.se>
10342 * dbus/dbus-message.c: (dbus_message_append_nil):
10345 2003-02-21 Anders Carlsson <andersca@codefactory.se>
10347 * dbus/dbus-message.c: (dbus_message_append_args_valist),
10348 (dbus_message_append_nil), (dbus_message_append_int32_array),
10349 (dbus_message_append_uint32_array),
10350 (dbus_message_append_double_array),
10351 (dbus_message_append_byte_array),
10352 (dbus_message_append_string_array), (dbus_message_get_args_valist),
10353 (dbus_message_iter_get_int32_array),
10354 (dbus_message_iter_get_uint32_array),
10355 (dbus_message_iter_get_double_array),
10356 (dbus_message_iter_get_byte_array),
10357 (dbus_message_iter_get_string_array):
10359 * dbus/dbus-message.h:
10360 Add functions for appending and getting arrays.
10362 2003-02-21 Anders Carlsson <andersca@codefactory.se>
10364 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
10365 element size at least 8 bytes, fixes mempool tests on
10368 2003-02-20 Alexander Larsson <alexl@redhat.com>
10370 * dbus/dbus-transport-unix.c (unix_do_iteration):
10371 Unlock the connection mutex during a blocking select call.
10372 Add todo about how we need a way to wake up the select.
10374 * dbus/dbus-connection-internal.h:
10375 * dbus/dbus-connection.c:
10376 Add _dbus_connection_lock and _dbus_connection_unlock.
10378 2003-02-19 Havoc Pennington <hp@pobox.com>
10380 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
10381 Doxyfile.in, not Doxyfile
10383 * dbus/dbus-keyring.c: do some hacking on this
10385 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
10387 * dbus/dbus-errors.c (dbus_set_error_const): do not call
10389 (dbus_set_error): remove dbus_error_init, check for message ==
10390 NULL *before* we sprintf into it, and add @todo about including
10391 system headers in this file
10393 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
10395 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
10397 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
10398 get various bits of user information based on either username
10400 (_dbus_homedir_from_username): new function
10402 2003-02-19 Anders Carlsson <andersca@codefactory.se>
10405 Add check for nonposix getpwnam_r
10407 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
10408 Align the pool element size to a sizeof (void *) boundary.
10410 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
10411 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
10412 General Solaris fixes.
10414 * test/data/valid-messages/simplest-manual.message:
10415 Explicitly state that we want little-endian packing.
10417 2003-02-19 Mikael Hallendal <micke@codefactory.se>
10419 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10421 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
10422 Added to create a transport connecting using a tcp/ip socket.
10424 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
10425 to a tcp socket at given host and port.
10426 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
10429 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10431 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
10432 Added to create a server listening on a TCP/IP socket.
10434 2003-02-19 Havoc Pennington <hp@pobox.com>
10436 Throughout: mop up all the Doxygen warnings and undocumented
10439 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
10440 to search any paths.
10442 * dbus/dbus-threads.c: move global mutex initializers to
10443 dbus-internals.h, multiple prototypes was confusing doxygen
10444 besides being kind of ugly
10446 * Doxyfile (PREDEFINED): have Doxygen define
10447 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
10448 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
10449 (do not abuse the feature! it's for stuff like the autogenerated
10450 macros in dbus-md5.c, not just for things you don't feel like
10453 2003-02-18 Havoc Pennington <hp@pobox.com>
10455 * dbus/dbus-string.c (_dbus_string_zero): new function
10457 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
10458 wrap it in some dbus-friendly API
10460 * dbus/dbus-types.h: add 16-bit types
10462 2003-02-18 Joe Shaw <joe@assbarn.com>
10464 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
10465 credentials from our currently running process.
10466 (get_word): Fix a buglet where we were copying the entire length
10467 instead of relative to our position.
10469 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
10470 keys on the stack... it's 640k of data.
10472 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
10473 read the credentials byte off the socket, even if we don't have
10475 (_dbus_poll): Implement poll() using select() for systems which
10478 * glib/test-dbus-glib.c (main): Print out an error if no
10479 parameters are given.
10481 * test/data/auth/fallback.auth-script: Added. Tests that a client
10482 can fallback to a secondary auth mechanism if the first fails.
10484 2003-02-18 Havoc Pennington <hp@pobox.com>
10486 * AUTHORS: add Alex
10488 2003-02-17 Havoc Pennington <hp@pobox.com>
10490 * doc/dbus-specification.sgml: lots of cosmetic
10491 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
10492 env variable to DBUS_BUS_ADDRESS, s/client/application/,
10493 s/server/bus/ (except in authentication section). Add a section
10494 "Message Bus Message Routing"
10496 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
10502 2003-02-17 Anders Carlsson <andersca@codefactory.se>
10504 * doc/dbus-specification.sgml:
10505 Specification updates.
10507 2003-02-17 Anders Carlsson <andersca@codefactory.se>
10509 * bus/activation.c: (bus_activation_init), (child_setup),
10510 (bus_activation_activate_service):
10511 * bus/activation.h:
10512 * bus/main.c: (main):
10513 Set DBUS_ADDRESS environment variable.
10515 * dbus/dbus-errors.c: (dbus_set_error):
10516 Don't use va_copy since that's a C99 feature.
10518 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
10519 (_dbus_spawn_async):
10520 * dbus/dbus-sysdeps.h:
10521 Add child_setup_func to _dbus_spawn_async.
10523 * doc/dbus-specification.sgml:
10524 Update specification.
10526 * test/spawn-test.c: (setup_func), (main):
10529 2003-02-17 Alexander Larsson <alexl@redhat.com>
10531 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
10534 2003-02-17 Anders Carlsson <andersca@codefactory.se>
10538 * doc/dbus-test-plan.sgml:
10539 Add test plan document.
10541 * test/Makefile.am:
10544 2003-02-17 Anders Carlsson <andersca@codefactory.se>
10546 * dbus/dbus-message.c: (decode_header_data),
10547 (_dbus_message_loader_return_buffer):
10548 Set the header padding amount when loading a message.
10550 2003-02-16 Anders Carlsson <andersca@codefactory.se>
10552 * bus/dispatch.c: (send_one_message):
10553 Only send broadcast messages to registered connections.
10555 * dbus/dbus-message.c: (dbus_message_name_is):
10556 * dbus/dbus-message.h:
10557 New convenience function.
10559 * dbus/dbus-transport-debug.c: (do_reading):
10560 Only dispatch one message per run.
10562 * test/Makefile.am:
10563 * test/bus-test.c: (new_connection_callback), (die),
10564 (test_hello_client1_handler), (test_hello_client2_handler),
10565 (test_hello_replies), (main):
10567 * test/bus-test-loop.[ch]:
10570 2003-02-16 Havoc Pennington <hp@pobox.com>
10572 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
10573 backward conditional
10575 2003-02-16 Alexander Larsson <alexl@redhat.com>
10577 * dbus/dbus-connection.c:
10578 Implement sent_message_with_reply. (with_reply_and block is still
10580 Made dispatch_message not lose message if OOM.
10582 * dbus/dbus-errors.h:
10583 Add NoReply error (for reply timeouts).
10585 2003-02-16 Alexander Larsson <alexl@redhat.com>
10587 * dbus/dbus-hash.c (_dbus_hash_table_unref):
10588 Actually free keys and values when destroying hashtable.
10590 2003-02-16 Anders Carlsson <andersca@codefactory.se>
10592 * dbus/dbus-auth.c: (client_try_next_mechanism):
10595 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
10596 Return TRUE if there's no thread implementation around.
10598 * glib/dbus-gmain.c: (free_source),
10599 (dbus_connection_hookup_with_g_main):
10600 Make sure to remove the GSource when the connection is finalized.
10602 2003-02-16 Anders Carlsson <andersca@codefactory.se>
10604 * bus/dispatch.c: (bus_dispatch_message_handler):
10605 * dbus/dbus-errors.h:
10606 Return an error if someone tries to send a message to a service
10607 that doesn't exist.
10609 2003-02-16 Anders Carlsson <andersca@codefactory.se>
10611 * bus/activation.c: (load_directory), (bus_activation_init),
10612 (bus_activation_activate_service):
10613 * bus/activation.h:
10615 (bus_driver_handle_activate_service), (bus_driver_handle_message):
10616 More work on the activation handling.
10618 * dbus/dbus-errors.h:
10619 Add some error messages
10621 * dbus/dbus-message.c: (dbus_message_new_error_reply):
10622 * dbus/dbus-message.h:
10623 New function that creates an error message.
10625 * dbus/dbus-protocol.h:
10626 Add ACTIVATE_SERVER message.
10628 * dbus/dbus-server-unix.c: (unix_handle_watch),
10629 (_dbus_server_new_for_domain_socket):
10630 Call _dbus_fd_set_close_on_exec.
10632 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
10633 (_dbus_spawn_async), (_dbus_disable_sigpipe),
10634 (_dbus_fd_set_close_on_exec):
10635 * dbus/dbus-sysdeps.h:
10636 Add _dbus_fd_set_close_on exec function. Also add function that checks
10637 that all open fds are set to close-on-exec and warns otherwise.
10639 * dbus/dbus-transport-unix.c:
10640 (_dbus_transport_new_for_domain_socket):
10641 Call _dbus_fd_set_close_on_exec.
10643 2003-02-16 Havoc Pennington <hp@pobox.com>
10645 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
10646 allow people to avoid setting SIGPIPE to SIG_IGN
10647 (_dbus_connection_new_for_transport): disable SIGPIPE unless
10648 we've been asked not to
10650 2003-02-15 Anders Carlsson <andersca@codefactory.se>
10652 * dbus/dbus-list.c: (_dbus_list_append_link),
10653 (_dbus_list_prepend_link):
10654 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
10658 2003-02-15 Anders Carlsson <andersca@codefactory.se>
10661 * bus/activation.c: (bus_activation_entry_free),
10662 (add_desktop_file_entry), (load_directory), (bus_activation_init):
10663 * bus/activation.h:
10664 * bus/main.c: (main):
10665 Add simple activation support, doesn't work yet though.
10667 2003-02-15 Zack Rusin <zack@kde.org>
10669 * qt/dbus-qthread.cpp: small casting fix
10671 2003-02-15 Anders Carlsson <andersca@codefactory.se>
10673 * dbus/dbus-errors.c: (dbus_set_error):
10674 * dbus/dbus-errors.h:
10675 Add a few errors and make dbus_set_error void.
10677 * dbus/dbus-sysdeps.c:
10678 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
10679 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
10680 * dbus/dbus-sysdeps.h:
10681 Add _dbus_spawn_async.
10683 * test/spawn-test.c: (main):
10684 Test for _dbus_spawn_async.
10686 2003-02-15 Anders Carlsson <andersca@codefactory.se>
10688 * dbus/dbus-internals.h:
10689 Fix build without tests.
10691 * dbus/dbus-list.c: (alloc_link):
10692 Fix a segfault when a malloc fails.
10694 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
10695 (dbus_malloc0), (dbus_realloc):
10696 Add support for malloc debugging.
10698 2003-02-15 Alexander Larsson <alexl@redhat.com>
10700 * dbus/dbus-threads.c:
10701 * dbus/dbus-threads.h:
10702 Add condvars. Remove static mutext from API.
10703 Implement static mutexes by initializing them from threads_init.
10705 * glib/dbus-gthread.c:
10706 * qt/dbus-qthread.cpp:
10707 Update with the thread api changes.
10710 * dbus/dbus-list.c:
10711 * dbus/dbus-list.h:
10712 Turn StaticMutex into normal mutex + init function.
10713 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
10714 _dbus_list_append_link, _dbus_list_prepend_link
10717 * dbus/dbus-sysdeps.c:
10718 * dbus/dbus-sysdeps.h:
10719 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
10720 _dbus_atomic_dec. Only slow fallback implementation at the moment.
10722 * dbus/dbus-protocol.h:
10723 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
10725 * dbus/dbus-message.c:
10726 Make ref/unref atomic.
10729 * dbus/dbus-connection-internal.h:
10730 * dbus/dbus-connection.c:
10731 * dbus/dbus-connection.h:
10733 Change _peek to _borrow,_return & _steal_borrowed.
10734 Change disconnect callback to event.
10735 Make dbus_connection_dispatch_messages reentrant.
10737 * dbus/dbus-transport.c:
10738 Don't ref the connection on calls to the transport
10741 * dbus/dbus-message-handler.c:
10744 * glib/dbus-gmain.c:
10745 Don't use peek_message anymore
10747 * test/Makefile.am:
10748 * test/debug-thread.c:
10749 * test/debug-thread.h:
10750 Simple thread implementation that asserts() on deadlocks in
10751 single-threaded code.
10754 (main) Call debug_threads_init.
10757 Use disconnect message instead of disconnect callback.
10759 * bus/connection.c:
10760 * bus/connection.h:
10761 Don't call dbus_connection_set_disconnect_function. Instead export
10762 bus_connection_disconnect.
10765 Call bus_connection_disconnect when we get a disconnected message.
10767 2003-02-15 Havoc Pennington <hp@pobox.com>
10769 * dbus/dbus-message.c (dbus_message_new): fool around with the
10772 2003-02-14 Havoc Pennington <hp@pobox.com>
10774 * dbus/dbus-mempool.c: fail if the debug functions so indicate
10776 * dbus/dbus-memory.c: fail if the debug functions indicate we
10779 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
10780 (_dbus_decrement_fail_alloc_counter): debug functions to
10781 simulate memory allocation failures
10783 2003-02-14 Havoc Pennington <hp@pobox.com>
10785 * dbus/dbus-errors.h (struct DBusError): add a word of padding
10788 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10790 * bus/driver.c: (bus_driver_handle_hello):
10792 * bus/services.c: (bus_service_lookup):
10793 Reorder message sending so we get a more sane order.
10795 * test/bus-test.c: (message_handler):
10798 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10800 * bus/driver.c: (bus_driver_send_service_deleted),
10801 (bus_driver_send_service_created), (bus_driver_send_service_lost),
10802 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10803 (bus_driver_send_welcome_message),
10804 (bus_driver_handle_list_services),
10805 (bus_driver_handle_acquire_service),
10806 (bus_driver_handle_service_exists):
10807 * dbus/dbus-bus.c: (dbus_bus_register_client),
10808 (dbus_bus_acquire_service), (dbus_bus_service_exists):
10809 * dbus/dbus-errors.c: (dbus_result_to_string):
10810 * dbus/dbus-errors.h:
10811 * dbus/dbus-message.c: (dbus_message_append_args),
10812 (dbus_message_append_args_valist), (dbus_message_get_args),
10813 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
10814 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
10815 (dbus_message_iter_get_byte_array),
10816 (dbus_message_iter_get_string_array), (message_iter_test),
10817 (check_message_handling), (_dbus_message_test):
10818 * dbus/dbus-message.h:
10819 * test/bus-test.c: (main):
10820 Change fields to arguments in messages, so that they won't be
10821 confused with header fields.
10823 * glib/test-dbus-glib.c: (main):
10824 Remove append_fields from hello message.
10826 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10828 * dbus/dbus-errors.c:
10829 * dbus/dbus-message.c:
10830 * dbus/dbus-string.c:
10831 Documentation fixes.
10833 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10835 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
10837 Implement support for timeouts in dbus-glib.
10839 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10841 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10842 * dbus/dbus-message.c: (process_test_subdir):
10843 * test/break-loader.c: (find_breaks_based_on):
10844 Plug some memory leaks.
10846 2003-02-13 Richard Hult <rhult@codefactory.se>
10848 * bus/main.c: Fix build.
10850 * dbus/dbus-errors.h:
10851 * dbus/dbus-errors.c: Fix copyright for Anders.
10853 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10858 * bus/connection.c: (bus_connection_foreach):
10861 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
10862 (unescape_string), (new_section), (parse_section_start),
10863 (parse_key_value), (report_error), (bus_desktop_file_load),
10864 (bus_desktop_file_get_string):
10865 * bus/desktop-file.h:
10866 Use DBusError for error reporting.
10868 * bus/dispatch.c: (send_one_message),
10869 (bus_dispatch_message_handler):
10870 * bus/driver.c: (bus_driver_send_service_deleted),
10871 (bus_driver_send_service_created), (bus_driver_send_service_lost),
10872 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10873 (bus_driver_send_welcome_message),
10874 (bus_driver_handle_list_services),
10875 (bus_driver_handle_acquire_service),
10876 (bus_driver_handle_service_exists):
10877 * bus/loop.c: (bus_loop_run):
10879 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
10881 * bus/utils.c: (bus_wait_for_memory):
10883 New files with general utility functions.
10885 * dbus/dbus-internals.h:
10886 Remove _DBUS_HANDLE_OOM.
10888 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10890 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
10891 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
10892 * dbus/dbus-errors.h:
10893 Add DBusError structure.
10895 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10897 * test/data/valid-messages/standard-acquire-service.message:
10898 * test/data/valid-messages/standard-hello.message:
10899 * test/data/valid-messages/standard-list-services.message:
10900 * test/data/valid-messages/standard-service-exists.message:
10901 Add some standard messages.
10903 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10905 * bus/driver.c: (bus_driver_send_welcome_message),
10906 (bus_driver_handle_list_services),
10907 (bus_driver_handle_acquire_service),
10908 (bus_driver_handle_service_exists), (bus_driver_handle_message):
10909 Update for API changes in libdbus.
10911 * dbus/dbus-message.c: (dbus_message_new_reply):
10912 * dbus/dbus-message.h:
10913 Remove the name argument. The spec states that replies shouldn't
10916 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10918 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
10919 (report_error), (bus_desktop_file_load), (lookup_section),
10920 (lookup_line), (bus_desktop_file_get_raw),
10921 (bus_desktop_file_get_string):
10922 * bus/desktop-file.h:
10923 Some fixes, and new functions for getting a key value from a section.
10925 2003-02-13 Havoc Pennington <hp@pobox.com>
10927 * test/data/auth/fail-after-n-attempts.auth-script: new test
10929 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
10932 2003-02-13 Havoc Pennington <hp@pobox.com>
10934 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
10935 dbus_credentials_match were backward
10937 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
10938 NO_CREDENTIALS and ROOT_CREDENTIALS
10940 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
10941 into here. Never process more commands after we've reached an
10942 end state; store further data as unused bytes.
10944 * test/data/auth/*: add more auth tests
10946 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
10947 command to match exact string and EXPECT_UNUSED to match unused
10950 * test/Makefile.am (dist-hook): fix to dist all the test stuff
10952 2003-02-12 Havoc Pennington <hp@pobox.com>
10954 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
10955 \r off of popped lines
10957 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
10960 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
10963 2003-02-12 Havoc Pennington <hp@pobox.com>
10965 * dbus/Makefile.am: remove break-loader from the build, since it
10968 * configure.in: add --enable-gcov to turn on coverage profiling
10969 flags and disable optimization
10971 2003-02-10 Havoc Pennington <hp@pobox.com>
10973 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
10974 initial cut at test framework for DBusAuth from laptop.
10975 Doesn't quite work yet but it compiles and I need to get
10976 it off the 266mhz laptop. ;-)
10978 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
10979 fix a memleak in error case
10981 2003-02-12 Anders Carlsson <andersca@codefactory.se>
10984 * bus/desktop-file.c:
10985 * bus/desktop-file.h:
10986 Add a desktop file parser.
10988 2003-02-11 Zack Rusin <zack@kde.org>
10990 * qt/message.[h|cpp]: sample implementation
10991 of the KDE wrapper for DBusMessage
10993 2003-02-09 Zack Rusin <zack@kde.org>
10995 * test/bus-test.c: make_it_compile
10996 * doc/dbus-specification.sgml: minimal semantic fix
10998 2003-02-06 Anders Carlsson <andersca@codefactory.se>
11004 2003-02-06 Anders Carlsson <andersca@codefactory.se>
11006 * dbus/Makefile.am:
11007 * dbus/dbus-break-loader.c:
11008 * test/Makefile.am:
11009 * test/break-loader.c:
11010 Move dbus-break-loader to test/ and rename it to break-loader.
11012 2003-02-02 Havoc Pennington <hp@pobox.com>
11014 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
11015 for code to manage cookies in your home directory
11017 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
11019 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
11020 to authenticate, then disconnect the client.
11022 2003-02-03 Alexander Larsson <alexl@redhat.com>
11024 * dbus/dbus-message.c (dbus_message_append_fields):
11027 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11029 * doc/dbus-specification.sgml:
11030 Update address format section.
11032 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11034 * test/Makefile.am:
11035 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
11036 (message_handler), (new_connection_callback), (loop_quit),
11037 (loop_run), (main):
11040 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11042 * bus/driver.c: (bus_driver_handle_service_exists):
11043 Simplify the code a bit.
11045 * dbus/dbus-bus.c: (dbus_bus_service_exists):
11048 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11051 Add libdbus-daemon.la and link to it.
11053 2003-02-01 James Willcox <jwillcox@gnome.org>
11055 * bus/driver.c: (bus_driver_handle_own_service):
11056 Actually include the service reply code in the message.
11058 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11060 * bus/driver.c: (bus_driver_handle_service_exists):
11061 Don't unref the incoming message.
11063 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11065 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
11067 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11069 * dbus/dbus-server.c: (dbus_server_listen):
11070 * dbus/dbus-transport.c: (_dbus_transport_open):
11071 ifdef out the calls to the debug transport and server.
11073 2003-02-02 Alexander Larsson <alexl@redhat.com>
11075 * dbus/dbus-watch.c (dbus_watch_get_flags):
11076 Add note in the docs that ERROR or HANGUP won't be returned
11077 and are assumed always on.
11079 * glib/dbus-gmain.c (add_watch):
11080 Always add IO_ERR | IO_HUP
11082 * dbus/dbus-message.h:
11083 Add semicolon after dbus_message_iter_get_string_array().
11084 Makes qt code build again
11086 2003-02-01 Anders Carlsson <andersca@codefactory.se>
11088 * bus/driver.c: (create_unique_client_name),
11089 (bus_driver_handle_hello):
11090 Don't take a name, just use a numeric id to identify
11093 * dbus/Makefile.am:
11094 * dbus/dbus-bus.c: (dbus_bus_register_client),
11095 (dbus_bus_acquire_service), (dbus_bus_service_exists):
11097 Add new convenience functions for communicating with the bus.
11099 * dbus/dbus-message.h:
11101 * dbus/dbus-protocol.h:
11104 2003-02-01 Alexander Larsson <alexl@redhat.com>
11106 * dbus/dbus-message.c (dbus_message_append_fields):
11107 Add some more doc comments.
11109 2003-02-01 Havoc Pennington <hp@pobox.com>
11111 * dbus/dbus-break-loader.c (randomly_modify_length): change
11112 a 4-byte value in the message as if it were a length
11114 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
11115 execute bit on saved files
11117 2003-02-01 Havoc Pennington <hp@pobox.com>
11119 * dbus/dbus-break-loader.c (main): new program to find messages
11120 that break the loader.
11122 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
11123 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
11125 * dbus/dbus-string.c (_dbus_string_set_byte): new
11127 2003-01-31 Havoc Pennington <hp@pobox.com>
11129 * dbus/dbus-message.c: refactor the test code to be more general,
11130 in preparation for writing a "randomly permute test cases to
11131 try to break the loader" program.
11133 2003-01-31 Havoc Pennington <hp@pobox.com>
11135 * doc/dbus-specification.sgml: work on the specification
11137 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
11138 the protocol version of the message.
11140 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
11141 no longer specifies that.
11142 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
11145 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
11146 "break" for DBUS_TYPE_NIL, remove @todo
11148 2003-01-31 Havoc Pennington <hp@pobox.com>
11150 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
11151 just set_is_error/get_is_error as this is a commonly-used
11152 function, and write docs.
11154 2003-01-31 Anders Carlsson <andersca@codefactory.se>
11156 * dbus/dbus-address.c: (dbus_address_entry_free):
11157 Free key and value lists.
11159 * dbus/dbus-internals.c: (_dbus_type_to_string):
11160 Add the types we didn't have.
11162 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
11163 (_dbus_marshal_validate_arg):
11166 * dbus/dbus-message.c: (dbus_message_set_sender):
11167 Remove todo about being able to set sender to NULL.
11169 (dbus_message_set_is_error_reply),
11170 (dbus_message_get_is_error_reply):
11171 * dbus/dbus-message.h:
11174 * dbus/dbus-protocol.h:
11175 Add error reply flag.
11177 * test/data/valid-messages/opposite-endian.message:
11178 Add NIL type to test.
11180 2003-01-31 Havoc Pennington <hp@pobox.com>
11182 * doc/dbus-specification.sgml: fully specify the header. Add
11183 flags and major protocol version, and change header/body len to
11186 * dbus/dbus-message-builder.c (append_saved_length): append length
11189 * dbus/dbus-message.c (dbus_message_create_header): change header
11190 length and body length to unsigned. Add the new fields from the
11192 (_dbus_message_loader_return_buffer): unsigned header/body len
11194 2003-01-30 Havoc Pennington <hp@pobox.com>
11196 * dbus/dbus-auth.c: rework to use only REJECTED, no
11199 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
11200 use REJECTED, suggested by Mark McLoughlin
11202 2003-01-30 Havoc Pennington <hp@pobox.com>
11204 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
11205 a better way to report errors here. e.g. "unix address lacks
11206 path" or something. also "no such file" when the path doesn't
11209 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
11211 (dbus_parse_address): add @todo about documenting address format,
11212 and allowing , and ; to be escaped
11214 2003-01-30 Anders Carlsson <andersca@codefactory.se>
11216 * dbus/Makefile.am:
11217 Add dbus-address.[ch]
11219 * dbus/dbus-address.c: (dbus_address_entry_free),
11220 (dbus_address_entries_free), (create_entry),
11221 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
11222 (dbus_parse_address), (_dbus_address_test):
11223 * dbus/dbus-address.h:
11224 New files for dealing with address parsing.
11226 * dbus/dbus-connection.c:
11227 Document timeout functions.
11229 * dbus/dbus-message.c:
11230 Document dbus_message_new_from_message.
11232 * dbus/dbus-server-debug.c:
11235 * dbus/dbus-server.c: (dbus_server_listen):
11236 Parse address and use correct server implementation.
11238 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
11239 * dbus/dbus-string.h:
11240 New function with test.
11242 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
11243 * dbus/dbus-test.h:
11246 * dbus/dbus-transport-debug.c:
11249 * dbus/dbus-transport.c: (_dbus_transport_open):
11250 Parse address and use correct transport implementation.
11252 2003-01-30 Havoc Pennington <hp@pobox.com>
11254 * dbus/dbus-message.c: use message->byte_order instead of
11255 DBUS_COMPILER_BYTE_ORDER throughout.
11256 (dbus_message_create_header): pad header to align the
11257 start of the body of the message to 8-byte boundary
11259 * dbus/dbus-marshal.h: make all the demarshalers take const
11260 DBusString arguments.
11262 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
11263 validate message args here, so we don't have to do slow validation
11264 later, and so we catch bad messages as they are incoming. Also add
11265 better checks on header_len and body_len. Also fill in
11266 message->byte_order
11268 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
11269 implemented properly)
11270 (_dbus_string_validate_nul): new function to check all-nul
11272 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
11273 get_arg_end_pos and remove all validation
11274 (_dbus_marshal_validate_arg): actually do validation here.
11276 2003-01-29 Havoc Pennington <hp@pobox.com>
11278 * dbus/dbus-message.c (check_message_handling): fix assertion
11279 failure on set_client_serial
11281 2003-01-28 Havoc Pennington <hp@pobox.com>
11283 * dbus/dbus-server-debug.c: Add doc section comments
11285 * dbus/dbus-transport-debug.c: add doc section comments
11287 2003-01-28 Havoc Pennington <hp@redhat.com>
11289 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
11290 the reverse order from how I had it
11291 (_dbus_string_base64_encode): reverse encoding order. I was
11292 basically byteswapping everything during encoding.
11294 2003-01-28 Anders Carlsson <andersca@codefactory.se>
11296 * dbus/dbus-connection-internal.h:
11297 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
11298 (_dbus_connection_remove_timeout):
11299 Add functions for adding and removing timeouts.
11301 * dbus/dbus-message.c: (dbus_message_new_from_message):
11302 Add new function that takes a message and creates an exact
11303 copy of it, but with the refcount set to 1.
11304 (check_message_handling):
11307 * dbus/dbus-server-protected.h:
11308 * dbus/dbus-server.c: (_dbus_server_init_base),
11309 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
11310 (dbus_server_set_timeout_functions):
11311 (_dbus_server_remove_timeout):
11312 New functions so that a server can add and remove timeouts.
11314 (dbus_server_listen):
11315 Add commented out call to dbus_server_debug_new.
11317 * dbus/dbus-timeout.c: (_dbus_timeout_new):
11318 Actually set the handler, doh.
11320 * dbus/dbus-transport.c: (_dbus_transport_open):
11321 Add commented out call to dbus_transport_debug_client_new.
11323 * dbus/Makefile.am:
11324 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
11326 2003-01-28 Havoc Pennington <hp@pobox.com>
11328 * dbus/dbus-message.c (check_message_handling): function to check
11329 on the loaded message, iterates over it etc.
11331 2003-01-28 Havoc Pennington <hp@pobox.com>
11333 * test/Makefile.am (dist-hook): fix make distdir
11335 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
11337 2003-01-27 Havoc Pennington <hp@pobox.com>
11339 * dbus/dbus-mempool.c (time_for_size): replace printf with
11342 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
11343 empty lines; fix the SAVE_LENGTH stuff to be
11344 START_LENGTH/END_LENGTH so it actually works; couple other
11347 * test/Makefile.am (dist-hook): add dist-hook for .message files
11349 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
11350 can be constant or locked.
11351 (_dbus_string_free): allow freeing a const string as
11352 documented/intended
11354 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
11356 * dbus/dbus-test-main.c (main): take an argument which is the
11357 directory containing test data
11359 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
11360 argument to this and load all the messages in test/data/
11361 checking that they can be loaded or not loaded as appropriate.
11363 2003-01-27 Anders Carlsson <andersca@codefactory.se>
11365 * bus/dispatch.c: (bus_dispatch_message_handler):
11366 Dispatch messages sent to services.
11368 * bus/driver.c: (bus_driver_send_service_deleted),
11369 (bus_driver_send_service_created), (bus_driver_send_service_lost),
11370 (bus_driver_send_service_acquired):
11371 Add helper functions for sending service related messages.
11373 (bus_driver_send_welcome_message):
11374 Send HELLO_REPLY instead of WELCOME.
11376 (bus_driver_handle_list_services):
11377 Send LIST_SERVICES_REPLY instead of SERVICES.
11379 (bus_driver_handle_own_service),
11380 (bus_driver_handle_service_exists):
11381 New message handlers.
11383 (bus_driver_handle_message):
11384 Invoke new message handlers.
11386 (bus_driver_remove_connection):
11387 Don't remove any services here since that's done automatically
11388 by bus_service_remove_owner now.
11391 New function signatures.
11393 * bus/services.c: (bus_service_add_owner):
11394 Send ServiceAcquired message if we're the only primary owner.
11396 (bus_service_remove_owner):
11397 Send ServiceAcquired/ServiceLost messages.
11399 (bus_service_set_prohibit_replacement),
11400 (bus_service_get_prohibit_replacement):
11401 Functions for setting prohibit replacement.
11403 (bus_service_has_owner):
11404 New function that checks if a connection is in the owner queue of
11408 Add new function signatures.
11410 * dbus/dbus-list.c: (_dbus_list_test):
11411 Add tests for _dbus_list_remove_last and traversing the list backwards.
11413 * dbus/dbus-list.h:
11414 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
11415 go any further, so return NULL then.
11417 * dbus/dbus-protocol.h:
11418 Add new messages, service flags and service replies.
11420 2003-01-26 Havoc Pennington <hp@pobox.com>
11422 * dbus/dbus-message-builder.c: implement, completely untested.
11424 * test/data/*: add data to be used in testing.
11425 ".message" files are our simple loadable text format.
11426 ".message-raw" will be binary dumps of messages.
11428 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
11430 2003-01-26 Havoc Pennington <hp@pobox.com>
11432 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
11434 * dbus/dbus-errors.c (dbus_result_to_string): add
11437 * dbus/dbus-message-builder.c: new file, will contain code to load
11438 up messages from files. Not implemented yet.
11440 2003-01-26 Havoc Pennington <hp@pobox.com>
11442 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
11443 the sender by setting to NULL
11445 2003-01-26 Havoc Pennington <hp@pobox.com>
11447 The unit tests pass, but otherwise untested. If it breaks, the
11448 tests should have been better. ;-)
11450 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
11453 * dbus/dbus-message.c: redo everything so we maintain
11454 message->header as the only copy of the various fields.
11455 This avoids the possibility of out-of-memory in some cases,
11456 for example dbus_message_lock() can't run out of memory anymore,
11457 and avoids extra copying. Figured I may as well go ahead and do
11458 this since it was busted for dbus_message_lock to not return
11459 failure on OOM, and dbus_message_write_header was totally
11460 unchecked for OOM. Also fixed some random other bugs.
11462 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
11463 that strings are nul-terminated. Also, end_pos can be equal
11464 to string length just not greater than, I think.
11465 (_dbus_marshal_set_int32): new function
11466 (_dbus_marshal_set_uint32): new function
11467 (_dbus_marshal_set_string): new function
11469 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
11470 a warning, init timeout_list to NULL
11471 (dbus_connection_send_message): don't use uninitialized variable
11474 * dbus/dbus-string.c (_dbus_string_replace_len): new function
11476 2003-01-26 Anders Carlsson <andersca@codefactory.se>
11478 * bus/driver.c: (bus_driver_handle_hello),
11479 (bus_driver_send_welcome_message):
11482 2003-01-26 Anders Carlsson <andersca@codefactory.se>
11484 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
11485 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
11486 (dbus_connection_unref):
11487 * dbus/dbus-marshal.c: (_dbus_marshal_test):
11488 * dbus/dbus-message.c: (dbus_message_unref),
11491 (dbus_message_get_fields):
11492 Remove debugging printout.
11494 (_dbus_message_loader_return_buffer):
11495 Don't store the header string.
11497 (_dbus_message_test):
11500 2003-01-26 Richard Hult <rhult@codefactory.se>
11502 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
11503 the file descriptor list, since it can change under us.
11505 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11507 * glib/dbus-gmain.c: (dbus_connection_prepare),
11508 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
11509 (remove_watch), (dbus_connection_hookup_with_g_main):
11510 Rewrite the glib handling to use its own GSource instead of a
11511 GIOChannel so we can catch messages put in the queue while waiting
11514 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11517 * bus/connection.c: (connection_disconnect_handler),
11518 (connection_watch_callback), (bus_connection_setup):
11519 * bus/dispatch.c: (send_one_message),
11520 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
11521 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
11523 * bus/driver.c: (bus_driver_send_service_deleted),
11524 (bus_driver_send_service_created), (bus_driver_handle_hello),
11525 (bus_driver_send_welcome_message),
11526 (bus_driver_handle_list_services), (bus_driver_remove_connection),
11527 (bus_driver_handle_message):
11529 Refactor code, put the message dispatching in its own file. Use
11530 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
11533 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11535 * dbus/dbus-internals.h:
11536 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
11538 * dbus/dbus-message.c: (dbus_message_get_sender):
11539 * dbus/dbus-message.h:
11540 Implement dbus_message_get_sender.
11542 * dbus/dbus-protocol.h:
11543 Add message and service defines.
11545 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11547 * dbus/dbus-connection.c: (dbus_connection_send_message):
11548 * dbus/dbus-message-internal.h:
11549 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
11550 (dbus_message_write_header):
11551 Remove _dbus_messag_unlock and don't set the client serial on a
11552 message if one already exists.
11554 2003-01-24 Havoc Pennington <hp@pobox.com>
11556 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
11559 * bus/driver.c (bus_driver_handle_list_services): fix a leak
11562 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11564 * dbus/dbus-list.c: (alloc_link), (free_link):
11565 Use a memory pool for the links.
11567 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11569 * bus/connection.c: (bus_connection_foreach):
11570 * bus/connection.h:
11571 Add new bus_connection_foreach function.
11573 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
11574 Add function that broadcasts a message to all clients.
11576 (bus_driver_send_service_created), (bus_driver_handle_hello),
11577 (bus_driver_send_welcome_message),
11578 (bus_driver_handle_list_services), (bus_driver_message_handler):
11579 Implement functions that take care of listing services, and notifying
11580 clients when new services are created.
11582 * bus/services.c: (bus_services_list):
11584 Add new function that returns an array of strings with the currently
11585 registered services.
11587 * glib/dbus-glib.h:
11588 * glib/dbus-gmain.c:
11589 Update copyright year.
11591 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11593 * dbus/dbus-connection.c: (dbus_connection_send_message):
11594 Unlock the message in case it was sent earlier.
11596 (dbus_connection_send_message_with_reply_and_block):
11597 Remove the reply message from the list.
11599 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
11600 Set array_len and new_pos correctly.
11602 (_dbus_marshal_test):
11603 Remove debug output.
11605 * dbus/dbus-message-internal.h:
11606 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
11607 New function that returns the reply serial.
11609 (_dbus_message_unlock):
11610 New function that unlocks a message and resets its header.
11612 (dbus_message_append_string_array),
11613 (dbus_message_get_fields_valist),
11614 (dbus_message_iter_get_field_type),
11615 (dbus_message_iter_get_string_array),
11616 (dbus_message_get_fields),
11617 (dbus_message_append_fields_valist):
11618 Handle string arrays.
11620 (dbus_message_set_sender):
11621 Make this function public since the bus daemon needs it.
11623 (decode_header_data):
11624 Set the reply serial to -1 initially.
11626 * dbus/dbus-message.h:
11627 Add dbus_message_set_sender.
11629 2003-01-24 Havoc Pennington <hp@pobox.com>
11631 * doc/dbus-specification.sgml: add some stuff
11633 2003-01-22 Havoc Pennington <hp@pobox.com>
11635 * doc/dbus-specification.sgml: Start to document the protocol.
11637 2003-01-22 Havoc Pennington <hp@pobox.com>
11639 * dbus/dbus-connection.c
11640 (dbus_connection_send_message_with_reply_and_block): add some @todo
11642 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
11644 2003-01-21 Havoc Pennington <hp@pobox.com>
11646 (patch untested because can't compile)
11648 * bus/driver.c (create_unique_client_name): make this function
11649 never recycle client names. Also, caller should initialize
11652 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
11654 2003-01-21 Anders Carlsson <andersca@codefactory.se>
11656 * dbus/dbus-marshal.c: (_dbus_marshal_double),
11657 (_dbus_marshal_int32), (_dbus_marshal_uint32),
11658 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
11659 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
11660 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
11661 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
11662 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
11663 * dbus/dbus-marshal.h:
11664 * dbus/dbus-protocol.h:
11665 Add support for marshalling and demarshalling integer, double
11668 2003-01-21 Anders Carlsson <andersca@codefactory.se>
11673 * bus/connection.c: (connection_disconnect_handler):
11674 Remove the connection from the bus driver's list.
11676 (connection_watch_callback): Dispatch messages.
11678 (free_connection_data): Free connection name.
11680 (bus_connection_setup): Add connection to the bus driver's list.
11681 (bus_connection_remove_owned_service):
11682 (bus_connection_set_name), (bus_connection_get_name):
11683 Add functions for setting and getting the connection's name.
11685 * bus/connection.h:
11686 Add function headers.
11688 * bus/driver.c: (create_unique_client_name),
11689 (bus_driver_handle_hello_message),
11690 (bus_driver_send_welcome_message), (bus_driver_message_handler),
11691 (bus_driver_add_connection), (bus_driver_remove_connection):
11694 * bus/services.c: (bus_service_free):
11696 New file that handles communication and registreation with the bus
11699 2003-01-21 Anders Carlsson <andersca@codefactory.se>
11701 * dbus/dbus-connection.c: (dbus_connection_send_message):
11702 Add a new client_serial parameter.
11704 (dbus_connection_send_message_with_reply):
11705 Remove a @todo since we've implemented the blocking function.
11707 (dbus_connection_send_message_with_reply_and_block):
11708 New function that sends a message and waits for a reply and
11709 then returns the reply.
11711 * dbus/dbus-connection.h:
11714 * dbus/dbus-errors.c: (dbus_result_to_string):
11715 * dbus/dbus-errors.h:
11716 Add new DBUS_RESULT.
11718 * dbus/dbus-message-internal.h:
11719 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
11720 (_dbus_message_set_sender), (dbus_message_write_header),
11721 (dbus_message_new_reply), (decode_header_data),
11722 (_dbus_message_loader_return_buffer), (_dbus_message_test):
11723 * dbus/dbus-message.h:
11724 Add new functions that set the reply serial and sender.
11725 Also marshal and demarshal them correctly and add test.
11727 * dbus/dbus-protocol.h:
11728 Add new DBUS_MESSAGE_TYPE_SENDER.
11730 * glib/dbus-glib.h:
11731 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
11732 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
11733 (dbus_connection_hookup_with_g_main):
11734 * glib/test-dbus-glib.c: (main):
11735 Rewrite to use GIOChannel and remove the GSource crack.
11737 * test/echo-client.c: (main):
11738 * test/watch.c: (check_messages):
11739 Update for changed APIs
11741 2003-01-19 Anders Carlsson <andersca@codefactory.se>
11743 * dbus/Makefile.am: Add dbus-timeout.[cħ]
11745 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
11746 Create a DBusTimeoutList.
11747 (dbus_connection_set_timeout_functions): Add new function to
11748 set timeout callbacks
11750 * dbus/dbus-connection.h: Add public DBusTimeout API.
11752 * dbus/dbus-message.c: (dbus_message_get_service):
11753 * dbus/dbus-message.h: New function.
11755 * dbus/dbus-server.c: Fix small doc typo.
11757 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
11759 2003-01-19 Anders Carlsson <andersca@codefactory.se>
11761 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
11762 of the string, just as long as specified.
11764 2003-01-19 Havoc Pennington <hp@pobox.com>
11766 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
11769 * dbus/dbus-server.c (dbus_server_set_max_connections)
11770 (dbus_server_get_max_connections, dbus_server_get_n_connections):
11771 keep track of current number of connections, and add API for
11772 setting a max (but haven't implemented enforcing the max yet)
11774 2003-01-18 Havoc Pennington <hp@pobox.com>
11776 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
11777 reading/writing if read_watch != NULL or write_watch != NULL.
11779 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
11780 the message loader code to actually load message->header and
11781 message->body into the newly-created message.
11783 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
11786 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
11787 (dbus_connection_get_max_message_size)
11788 (dbus_connection_set_max_live_messages_size)
11789 (dbus_connection_get_max_live_messages_size): implement some
11790 resource limitation functions
11792 * dbus/dbus-resources.c: new file implementing some of the
11793 resource limits stuff
11795 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
11796 missing docs, add @todo to handle OOM etc.
11798 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
11801 2003-01-18 Havoc Pennington <hp@pobox.com>
11803 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
11804 connection if it hasn't been already.
11806 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
11807 replace with DisconnectFunction.
11809 2003-01-18 Havoc Pennington <hp@pobox.com>
11811 Building --disable-verbose-mode --disable-asserts --disable-tests
11812 cuts the library from 112K to 45K or so
11814 * configure.in: check for varargs macro support,
11815 add --enable-verbose-mode, --enable-asserts.
11817 * dbus/dbus-internals.h (_dbus_assert): support
11818 DBUS_DISABLE_ASSERT
11819 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
11821 2003-01-18 Havoc Pennington <hp@pobox.com>
11823 * dbus/dbus-test.c: include config.h so that tests actually run
11825 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
11826 so the failure mode when that assumption fails will be plenty
11829 2003-01-18 Havoc Pennington <hp@pobox.com>
11831 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
11833 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
11836 * test/Makefile.am: don't use special variable "TESTS" for echo-*
11837 since we don't want to use those in make check
11839 2003-01-15 Havoc Pennington <hp@redhat.com>
11845 2003-01-15 Havoc Pennington <hp@redhat.com>
11847 * test/Makefile.am: fix so that test source code ends up in the
11848 distribution on make distcheck
11850 2003-01-15 Havoc Pennington <hp@redhat.com>
11856 2003-01-15 Havoc Pennington <hp@redhat.com>
11858 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
11859 fix build when --disable-tests
11861 * Makefile.am (EXTRA_DIST): put HACKING in here
11863 * HACKING: document procedure for making a tarball release.
11865 2003-01-14 Anders Carlsson <andersca@codefactory.se>
11867 * bus/connection.c: (connection_error_handler),
11868 (bus_connection_setup):
11869 * bus/main.c: (main):
11870 Make sure that the DBusConnectionData struct is NULLed
11871 out to prevent a segfault.
11873 * dbus/dbus-errors.c: (dbus_result_to_string):
11874 * dbus/dbus-errors.h:
11875 * dbus/dbus-message.c: (dbus_message_get_fields),
11876 (dbus_message_get_fields_valist), (_dbus_message_test):
11877 * dbus/dbus-message.h:
11878 Make dbus_message_get_fields return a result code so we can
11879 track invalid fields as well as oom.
11881 2003-01-11 Havoc Pennington <hp@pobox.com>
11883 * configure.in: change --enable-test/--enable-ansi action-if-given
11884 to enable_foo=$enableval instead of enable_foo=yes
11886 2003-01-08 Havoc Pennington <hp@pobox.com>
11888 * dbus/dbus-string.c (_dbus_string_align_length): new function
11890 * dbus/dbus-test-main.c: move main() for test app here
11892 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
11893 symbol to run tests, because dbus-test isn't in the main
11896 Code review nitpicks.
11898 * dbus/dbus-message.c (dbus_message_write_header): add newlines
11899 for people with narrow emacs ;-). Assert client_serial was filled
11900 in. Assert message->name != NULL.
11901 (dbus_message_append_fields): have "first_field_type" arg separate
11902 from va list, needed for C++ binding that also uses varargs IIRC
11903 and helps with type safety
11904 (dbus_message_new): add @todo about using DBusString to store
11905 service/name internally
11906 (dbus_message_new): don't leak ->service and ->name on OOM later
11908 (dbus_message_unref): free the service name
11909 (dbus_message_get_fields): same change to varargs
11910 i.e. first_field_type
11911 (_dbus_message_loader_return_buffer): assert that the message data
11912 is aligned (if not it's a bug in our code). Put in verbose griping
11913 about why we set corrupted = TRUE.
11914 (decode_header_data): add FIXME that char* is evil. Was going to
11915 add FIXME about evil locale-specific string.h strncmp, but just
11916 switched to wacky string-as-uint32 optimization. Move check for
11917 "no room for field name" above get_const_data_len() to avoid
11918 assertion failure in get_const_data_len if we have trailing 2
11919 bytes or the like. Check for service and name fields being
11920 provided twice. Don't leak service/name on error. Require field
11921 names to be aligned to 4 bytes.
11923 * dbus/dbus-marshal.c: move byte swap stuff to header
11924 (_dbus_pack_int32): uscore-prefix
11925 (_dbus_unpack_int32): uscore-prefix
11926 (_dbus_unpack_uint32): export
11927 (_dbus_demarshal_string): add @todo complaining about use of
11929 (_dbus_marshal_get_field_end_pos): add @todo about bad error
11930 handling allowing corrupt data to go unchecked
11932 2003-01-08 Havoc Pennington <hp@redhat.com>
11934 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
11935 to the select() as needed for authentication. (should be using
11936 _dbus_poll() not select, but for another day)
11938 * dbus/dbus.h: include dbus/dbus-protocol.h
11940 2003-01-08 Anders Carlsson <andersca@codefactory.se>
11942 * dbus/Makefile.am (dbusinclude_HEADERS): Install
11945 2003-01-08 Anders Carlsson <andersca@codefactory.se>
11947 * dbus/dbus-internals.c: (_dbus_type_to_string):
11948 New function that returns a string describing a type.
11950 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
11951 * dbus/dbus-marshal.h:
11952 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
11953 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
11954 (dbus_message_iter_get_byte_array):
11955 * dbus/dbus-message.h:
11956 Add new convenience functions for appending and getting message fields.
11957 Also add demarshalling routines for byte arrays.
11959 2003-01-07 Anders Carlsson <andersca@codefactory.se>
11961 * dbus/dbus-connection-internal.h:
11962 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
11963 (_dbus_connection_get_next_client_serial),
11964 (dbus_connection_send_message):
11965 * dbus/dbus-internals.h:
11966 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
11967 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
11968 (_dbus_marshal_uint32), (_dbus_demarshal_double),
11969 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
11970 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
11971 (_dbus_verbose_bytes), (_dbus_marshal_test):
11972 * dbus/dbus-marshal.h:
11973 * dbus/dbus-message-internal.h:
11974 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
11975 (dbus_message_write_header), (_dbus_message_lock),
11976 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
11977 (dbus_message_get_name), (dbus_message_append_int32),
11978 (dbus_message_append_uint32), (dbus_message_append_double),
11979 (dbus_message_append_string), (dbus_message_append_byte_array),
11980 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
11981 (dbus_message_iter_unref), (dbus_message_iter_has_next),
11982 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
11983 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
11984 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
11985 (decode_header_data), (_dbus_message_loader_return_buffer),
11986 (message_iter_test), (_dbus_message_test):
11987 * dbus/dbus-message.h:
11988 * dbus/dbus-protocol.h:
11989 * dbus/dbus-test.c: (main):
11990 * dbus/dbus-test.h:
11991 * glib/test-dbus-glib.c: (message_handler), (main):
11992 * test/echo-client.c: (main):
11993 * test/watch.c: (check_messages):
11994 Make messages sendable and receivable for real.
11996 2003-01-07 Anders Carlsson <andersca@codefactory.se>
11998 * dbus/dbus-marshal.c: (_dbus_marshal_double),
11999 (_dbus_marshal_string), (_dbus_marshal_byte_array):
12000 * dbus/dbus-message.c: (dbus_message_append_int32),
12001 (dbus_message_append_uint32), (dbus_message_append_double),
12002 (dbus_message_append_string), (dbus_message_append_byte_array):
12003 Handle OOM restoration.
12005 2003-01-07 Anders Carlsson <andersca@codefactory.se>
12007 * dbus/dbus-marshal.c: (_dbus_marshal_string),
12008 (_dbus_demarshal_string), (_dbus_marshal_test):
12009 * dbus/dbus-marshal.h:
12010 * dbus/dbus-message.c: (dbus_message_get_name),
12011 Document these functions.
12013 (dbus_message_append_int32), (dbus_message_append_uint32),
12014 (dbus_message_append_double), (dbus_message_append_string),
12015 (dbus_message_append_byte_array):
12016 * dbus/dbus-message.h:
12017 Add functions for adding message fields of different types.
12019 * dbus/dbus-protocol.h:
12020 Add the different types.
12022 2003-01-05 Havoc Pennington <hp@pobox.com>
12024 * bus/connection.c: implement routines for handling connections,
12025 first thing is keeping a list of owned services on each connection
12026 and setting up watches etc.
12028 * bus/services.c: implement a mapping from service names to lists
12031 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
12033 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
12034 to use static mutexes for global data
12036 * dbus/dbus-connection.c (dbus_connection_set_data): add new
12037 collection of functions to set/get application-specific data
12038 on the DBusConnection.
12040 2003-01-04 Havoc Pennington <hp@pobox.com>
12042 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
12043 (_dbus_poll): new function
12045 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
12048 * bus/loop.c: initial code for the daemon main loop
12050 2003-01-04 Havoc Pennington <hp@pobox.com>
12052 * test/watch.c (error_handler): make it safe if the error handler
12053 is called multiple times (if we s/error handler/disconnect
12054 handler/ we should just guarantee it's called only once)
12056 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
12057 error handler on disconnect (it's quite possible we should
12058 just change the error handler to a "disconnect handler," I'm
12059 not sure we have any other meaningful errors)
12061 * configure.in: check for getpwnam_r
12063 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
12064 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
12065 mechanism as in SASL spec, using socket credentials
12067 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
12068 (_dbus_send_credentials_unix_socket): new function
12070 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
12072 (_dbus_write): only check errno if <0 returned
12073 (_dbus_write_two): ditto
12075 2003-01-02 Anders Carlsson <andersca@codefactory.se>
12077 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
12078 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
12079 (_dbus_marshal_test):
12080 * dbus/dbus-marshal.h:
12081 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
12082 to _dbus_marshal_utf8_string. Also fix some tests.
12084 2002-12-28 Harri Porten <porten@kde.org>
12086 * configure.in: added check for C++ compiler and a very cheesy
12087 check for the Qt integration
12089 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
12091 * qt/Makefile.am: added
12093 * qt/.cvsignore: added
12095 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
12096 latter, added #ifdef QT_THREAD_SUPPORT guard.
12098 * dbus/Makefile.am: added missing headers for make dist
12100 2002-12-28 Kristian Rietveld <kris@gtk.org>
12102 * dbus/Makefile.am: fixup export-symbols-regex.
12104 2002-12-27 Anders Carlsson <andersca@codefactory.se>
12106 * acinclude.m4: Add this file and put the
12107 PKG_CHECK_MODULE macro in it.
12109 2002-12-27 Anders Carlsson <andersca@codefactory.se>
12111 * dbus/dbus-marshal.c: (_dbus_marshal_string),
12112 (_dbus_demarshal_double), (_dbus_demarshal_int32),
12113 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
12114 (_dbus_marshal_test):
12115 Make the demarshalling routines align the pos argument.
12116 Add string marshalling tests and fix the obvious bugs
12119 2002-12-26 Havoc Pennington <hp@pobox.com>
12121 * dbus/dbus-auth.c: fixes fixes fixes
12123 * dbus/dbus-transport-unix.c: wire up support for
12124 encoding/decoding data on the wire
12126 * dbus/dbus-auth.c (_dbus_auth_encode_data)
12127 (_dbus_auth_decode_data): append to target string
12128 instead of nuking it.
12130 2002-12-26 Havoc Pennington <hp@pobox.com>
12132 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
12133 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
12136 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
12137 avoid swap_bytes() overhead (ignoring possible assembly stuff for
12138 now). Main point is because I wanted unpack_uint32 to implement
12139 _dbus_verbose_bytes
12140 (_dbus_verbose_bytes): new function
12142 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
12144 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
12145 mechanism to handle a corrupt message stream
12146 (_dbus_message_loader_new): fix preallocation to only prealloc,
12149 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
12150 (_dbus_string_test): enhance tests for copy/move and fix the
12153 * dbus/dbus-transport-unix.c: Hold references in more places to
12154 avoid reentrancy problems
12156 * dbus/dbus-transport.c: ditto
12158 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
12159 leak reference count in no-message case
12161 * test/watch.c (do_mainloop): handle adding/removing watches
12162 during iteration over the watches. Also, ref the connection/server
12163 stored on a watch, so we don't try to mangle a destroyed one.
12165 * dbus/dbus-transport-unix.c (do_authentication): perform
12168 * dbus/dbus-auth.c (get_state): add a state
12169 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
12170 (_dbus_auth_get_unused_bytes): append the unused bytes
12171 to the passed in string, rather than prepend
12173 * dbus/dbus-transport.c (_dbus_transport_init_base): create
12174 the auth conversation DBusAuth
12176 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
12177 (_dbus_transport_new_for_domain_socket): when creating a
12178 transport, pass in whether it's a client-side or server-side
12179 transport so we know which DBusAuth to create
12181 2002-12-03 Havoc Pennington <hp@pobox.com>
12183 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
12184 _after_ finalizing the derived members
12185 (unix_connection_set): unref watch if we fail to add it
12187 * dbus/dbus-connection.c (dbus_connection_unref): delete the
12188 transport first, so that the connection owned by the
12189 transport will be valid as the transport finalizes.
12191 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
12192 if necessary, and remove watches from the connection.
12194 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
12196 2002-12-26 Anders Carlsson <andersca@codefactory.se>
12198 * dbus/dbus-marshal.c: (_dbus_marshal_string),
12199 (_dbus_demarshal_double), (_dbus_demarshal_int32),
12200 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
12201 (_dbus_marshal_test):
12202 * dbus/dbus-marshal.h:
12203 Add string marshal functions and have the demarshal functions
12204 return the new position.
12206 2002-12-25 Havoc Pennington <hp@pobox.com>
12208 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
12209 it is a simple protocol that just maps directly to SASL.
12211 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
12212 initial implementation, not actually used yet.
12214 * dbus/dbus-string.c (_dbus_string_find): new function
12215 (_dbus_string_equal): new function
12216 (_dbus_string_base64_encode): new function
12217 (_dbus_string_base64_decode): new function
12219 2002-12-25 Anders Carlsson <andersca@codefactory.se>
12221 * dbus/Makefile.am:
12222 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
12223 (_dbus_marshal_int32), (_dbus_marshal_uint32),
12224 (_dbus_demarshal_double), (_dbus_demarshal_int32),
12225 (_dbus_demarshal_uint32), (_dbus_marshal_test):
12226 * dbus/dbus-marshal.h:
12227 * dbus/dbus-protocol.h:
12228 * dbus/dbus-test.c: (main):
12229 * dbus/dbus-test.h:
12230 Add un-optimized marshalling/demarshalling routines.
12232 2002-12-25 Harri Porten <porten@kde.org>
12234 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
12236 2002-12-24 Zack Rusin <zack@kde.org>
12238 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
12239 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
12242 2002-12-24 Havoc Pennington <hp@pobox.com>
12244 * glib/dbus-gthread.c: fix include
12246 * glib/dbus-glib.h: rename DBusMessageHandler for now.
12247 I think glib API needs to change, though, as you don't
12248 want to use DBusMessageFunction, you want to use the
12249 DBusMessageHandler object. Probably
12250 dbus_connection_open_with_g_main_loop()
12251 and dbus_connection_setup_g_main_loop() or something like that
12252 (but think of better names...) that just create a connection
12253 that has watch/timeout functions etc. already set up.
12255 * dbus/dbus-connection.c
12256 (dbus_connection_send_message_with_reply): new function just to
12257 show how the message handler helps us deal with replies.
12259 * dbus/dbus-list.c (_dbus_list_remove_last): new function
12261 * dbus/dbus-string.c (_dbus_string_test): free a string that
12264 * dbus/dbus-hash.c: use memory pools for the hash entries
12265 (rebuild_table): be more paranoid about overflow, and
12266 shrink table when we can
12267 (_dbus_hash_test): reduce number of sprintfs and write
12268 valid C89. Add tests for case where we grow and then
12269 shrink the hash table.
12271 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
12273 * dbus/dbus-connection.c (dbus_connection_register_handler)
12274 (dbus_connection_unregister_handler): new functions
12276 * dbus/dbus-message.c (dbus_message_get_name): new
12278 * dbus/dbus-list.c: fix docs typo
12280 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
12281 an object representing a handler for messages.
12283 2002-12-16 Anders Carlsson <andersca@codefactory.se>
12285 * glib/dbus-glib.h:
12286 * glib/dbus-gthread.c: (dbus_gthread_init):
12287 Don't use the gdbus prefix for public functions.
12289 2002-12-16 Anders Carlsson <andersca@codefactory.se>
12293 Add GLib checks and fixup .pc files
12295 * glib/Makefile.am:
12296 * glib/dbus-glib.h:
12297 * glib/dbus-gmain.c: (gdbus_connection_prepare),
12298 (gdbus_connection_check), (gdbus_connection_dispatch),
12299 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
12300 (dbus_connection_gsource_new):
12301 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
12302 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
12303 * glib/test-dbus-glib.c: (message_handler), (main):
12306 2002-12-15 Harri Porten <porten@kde.org>
12308 * autogen.sh: check for libtoolize before attempting to use it
12310 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
12313 * .cvsignore: ignore more stamp files
12315 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
12317 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
12318 without make install.
12320 2002-12-15 Havoc Pennington <hp@pobox.com>
12322 * dbus/dbus-threads.c: add thread stubs that a higher library
12323 layer can fill in. e.g. the GLib wrapper might fill them in with
12324 GThread stuff. We still need to use this thread API to
12325 thread-safe-ize the library.
12327 2002-12-12 Havoc Pennington <hp@pobox.com>
12329 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
12330 below new interfaces and include fewer system headers.
12332 * dbus/dbus-sysdeps.c (_dbus_read): new function
12333 (_dbus_write): new function
12334 (_dbus_write_two): new function
12335 (_dbus_connect_unix_socket): new function
12336 (_dbus_listen_unix_socket): new function
12338 * dbus/dbus-message-internal.h: change interfaces to use
12341 2002-12-11 Havoc Pennington <hp@pobox.com>
12343 * dbus/dbus-types.h: add dbus_unichar
12345 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
12347 * dbus/dbus-connection.c (dbus_connection_send_message): return
12350 * dbus/dbus-transport.c: include dbus-watch.h
12352 * dbus/dbus-connection.c: include dbus-message-internal.h
12354 * HACKING: add file with coding guidelines stuff.
12356 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
12357 handling here, for security purposes (as in vsftpd). Not actually
12358 using this class yet.
12360 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
12361 system/libc usage here, as in vsftpd, for ease of auditing (and
12362 should also simplify portability). Haven't actually moved all the
12363 system/libc usage into here yet.
12365 2002-11-25 Havoc Pennington <hp@pobox.com>
12367 * dbus/dbus-internals.c (_dbus_verbose): fix to not
12368 always print the first verbose message.
12370 2002-11-24 Havoc Pennington <hp@pobox.com>
12372 * test/echo-client.c, test/echo-server.c: cheesy test
12375 * configure.in (AC_CHECK_FUNCS): check for writev
12377 * dbus/dbus-message.c (_dbus_message_get_network_data): new
12380 * dbus/dbus-list.c (_dbus_list_foreach): new function
12382 * dbus/dbus-internals.c (_dbus_verbose): new function
12384 * dbus/dbus-server.c, dbus/dbus-server.h: public object
12385 representing a server that listens for connections.
12387 * dbus/.cvsignore: create
12389 * dbus/dbus-errors.h, dbus/dbus-errors.c:
12390 public API for reporting errors
12392 * dbus/dbus-connection.h, dbus/dbus-connection.c:
12393 public object representing a connection that
12394 sends/receives messages. (Same object used for
12395 both client and server.)
12397 * dbus/dbus-transport.h, dbus/dbus-transport.c:
12398 Basic abstraction for different kinds of stream
12399 that we might read/write messages from.
12401 2002-11-23 Havoc Pennington <hp@pobox.com>
12403 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
12406 * dbus/dbus-test.c (main): add list test, and include
12407 dbus-test.h as intended
12409 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
12410 (_dbus_hash_table_remove_int): return value indicates
12411 whether the entry existed to remove
12413 * dbus/dbus-list.c: add linked list utility class,
12414 with docs and tests
12416 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
12419 2002-11-23 Havoc Pennington <hp@pobox.com>
12421 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
12422 DBUS_END_DECLS to nothing, that should fix this once and for all
12424 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
12426 * dbus/dbus-message.c, dbus/dbus-hash.c:
12427 add some missing @brief
12429 2002-11-23 Havoc Pennington <hp@pobox.com>
12431 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
12432 to avoid confusing Doxygen
12434 * dbus/dbus-hash.c: @} not }@
12436 * dbus/dbus-message.c (struct DBusMessage): split out
12439 2002-11-23 Havoc Pennington <hp@pobox.com>
12441 * configure.in: pile on more warning flags if using gcc
12443 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
12444 to document static functions
12446 * configure.in: add summary to end of configure so it
12447 looks nice and attractive
12449 * dbus/dbus-hash.c: finish implementation and write unit
12452 * configure.in: add --enable-tests to enable unit tests
12454 * dbus/dbus-test.c: test program to run unit tests
12455 for all files in dbus/*, initially runs a test for
12458 * dbus/dbus-internals.h: file to hold some internal utility stuff
12460 2002-11-22 Havoc Pennington <hp@redhat.com>
12462 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
12463 "ported" away from Tcl
12465 * dbus/dbus-types.h: header for types such as dbus_bool_t
12467 2002-11-22 Havoc Pennington <hp@redhat.com>
12469 * dbus/dbus.h: fixups for doc warnings
12471 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
12473 (QUIET): make it quiet so we can see warnings
12475 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
12477 2002-11-22 Havoc Pennington <hp@redhat.com>
12479 * Makefile.am: include "Doxyfile" target in all-local
12481 * configure.in: generate the Doxyfile
12483 * Doxyfile.in: move Doxyfile here, so we can use
12484 configure to generate a Doxyfile with the right
12485 version number etc.
12487 2002-11-22 Havoc Pennington <hp@redhat.com>
12489 * dbus/dbus-message.c: move inline docs into .c file
12491 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
12492 so all docs are under doc/
12493 (MAN_EXTENSION): generate man pages. Use extension
12494 ".3dbus" which matches ".3qt" on my system,
12495 I guess this is OK, I don't know really.
12496 (FILE_PATTERNS): look for .c files not .h, makes sense
12497 for plain C I think
12499 2002-11-22 Havoc Pennington <hp@pobox.com>
12501 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
12502 because any app can be a server, and any app can be a client,
12503 the bus is a special kind of server.
12505 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
12507 * Doxyfile : adding. Still needs Makefile rules to be generated
12508 automatically (just run "doxygen" in the toplevel dir for now to
12511 * dbus/dbus-message.h : Adding sample docs (javadoc since
12512 resembles gtk-doc a little more)
12514 * dbus/dbus.h : Adding sample docs
12516 2002-11-21 Havoc Pennington <hp@redhat.com>
12518 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
12519 so we can allow ourselves to include files directly,
12520 instead of having to use dbus.h
12522 * dbus/dbus.h: fill in
12524 * dbus/dbus-message.h: sketch out a sample header file.
12525 Include griping if you include it directly instead of
12528 * dbus/dbus-macros.h: new file with macros for extern "C",
12529 TRUE/FALSE, NULL, etc.
12531 * doc/file-boilerplate.c: put include guards in here
12533 2002-11-21 Havoc Pennington <hp@redhat.com>
12535 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
12537 * COPYING: include the GPL as well, and license code
12538 under both AFL and GPL.
12540 2002-11-21 Havoc Pennington <hp@redhat.com>
12542 * acconfig.h: get rid of this
12544 * autogen.sh (run_configure): add --no-configure option
12546 * configure.in: remove AC_ARG_PROGRAM to make
12547 autoconf complain less. add AC_PREREQ.
12548 add AC_DEFINE third arg.
12550 2002-11-21 Anders Carlsson <andersca@codefactory.se>
12553 Fix references so we can distcheck.
12555 2002-11-21 Havoc Pennington <hp@redhat.com>
12557 * Initial module creation