1 2005-11-15 Robert McQueen <robot101@debian.org>
3 * dbus/dbus-glib-lowlevel.h, glib/dbus-gobject.c: Patch from Rob
4 Taylor to add two methods, dbus_g_method_return_get_reply and
5 dbus_g_method_return_send_reply, to allow you to get the reply
6 message from a DBusGMethodInvocation, append arbitrary stuff to it,
7 and send it. The GLib bindings can't marshal a return value of
8 something like a(s) if the array is empty - ultimately they should be
9 made to heed the signature of the out arguments as the Python bindings
10 now can, but this is a workable interim solution which might have
13 2005-11-15 Robert McQueen <robot101@debian.org>
15 * bus/driver.c, bus/services.c, bus/services.h: Add a ReleaseName
16 method to org.freedesktop.DBus to release a bus name or give up
17 waiting in the queue for it.
19 * dbus/dbus-bus.c, dbus/dbus-bus.h, dbus/dbus-shared.h: Add a
20 dbus_bus_release_name method to send the ReleaseName method calls.
21 Add constants for the return values to dbus/dbus-shared.h.
23 * doc/dbus-specification.xml: Document the new ReleaseName method
26 * python/dbus_bindings.pyx: Add a low-level python binding for the
29 * python/exceptions.py, python/service.py: Make freeing BusName
30 objects release the name. Add a NameExistsException, and fix a
31 bug with creating UnknownMethodException.
33 * test/python/test-client.py: Add tests for freeing BusName
34 objects causing names to be released.
36 2005-11-14 Robert McQueen <robot101@debian.org>
38 * python/service.py: Include the traceback in the error reply when we
39 send an exception over the bus. _BEST_ _PATCH_ _EVER_
41 2005-11-14 David Zeuthen <davidz@redhat.com>
43 Patch from Timo Hoenig <thoenig@suse.de>.
45 * bus/bus.c: I've recently investigated why the automatic reload
46 of configuration files does not work as expected.
48 Currently, reloading configuration files does only work when
49 running dbus-daemon with --nodaemon. If we are running as daemon
50 we're hitting a dnotify bug once we fork the process.
52 We're initializing the dnotify fds before calling fork(). Once
53 the child process forked it does still have the fds (and they
54 still show up in /proc/`pidof dbus-daemon`/fd/) but we're not
55 getting SIGIO as changes are made to the configuration files.
57 The attached patch moves the initialization of the dnotify fds to
58 process_config_postinit(). This is safe for all current code
59 paths and solves the dnotify disfunction. If we're running
60 dbus-daemon as daemon the fds for dnotify are now being
61 initialized after fork() for the child process.
63 * configure.in: The current configure.in check for dnotify probes
64 'x$target_os' for being 'xlinux-gnu'. I've changed the check to
65 match for 'xlinux', too. Additionally I have adapted the configure
66 option's style to match with the others.
68 2005-11-14 Robert McQueen <robot101@debian.org>
70 * python/decorators.py, python/service.py: Add a new argument to the
71 dbus.service.method decorator called sender_keyword, which if set,
72 specifies the name of an argument which will be provided the bus
73 name of the method caller.
75 * test/python/test-client.py, test/python/test-service.py: Add a
76 method and test to check the sender_keyword functionality.
78 2005-11-07 John (J5) Palmieri <johnp@redhat.com>
80 * bus/driver.c (bus_driver_handle_reload_config): Make sure we send an
81 empty reply so blocking calls don't block forever (Patch from Sjoerd
82 Simons <sjoerd at luon.net>)
84 * AUTHORS: Add Robert McQueen for his work on the Python
85 Bindings and other parts of D-Bus
87 2005-11-07 Robert McQueen <robot101@debian.org>
89 * python/decorators.py: Change emit_signal function to use the
90 signature annotation of the signal when marhsalling the arguments from
91 the service. Fix a bug where the code checking signature length
92 against argument length referenced the wrong variable.
94 * python/introspect_parser.py: Avoid adding the type signature of
95 signal arguments to any methods which occur after them in the
96 introspection data (!) by making the parser a little more careful
97 about its current state.
99 * python/service.py: Remove debug prints from last commit (again :D).
101 * test/python/test-client.py, test/python/test-service.py: Add test
102 signals with signature decorators to test the strict marshalling code
103 gives errors at the right time. Could do with checking the signals
104 actually get emitted too, given that the test does nothing with
105 signals at the moment...
107 2005-11-07 Robert McQueen <robot101@debian.org>
109 * python/_dbus.py: Add WeakReferenceDictionary cache of dbus.Bus
110 instances to stop madness of creating new instances representing
111 the same bus connection all the time, rendering any tracking of
112 match rules and bus names quite meaningless. Caught a bug where
113 the private argument to SessionBus() and friends was being passed
114 in as use_default_mainloop by mistake. Still some problems with
115 multiple dbus_binding.Connection instances representing the same
116 low-level connection (eg when you use both SessionBus() and
117 StarterBus() in same process), but it's a lot better now than it
120 * python/dbus_bindings.pyx: Add constants with the return values
121 for bus_request_name().
123 * python/service.py: Store bus name instances in a per-dbus.Bus cache
124 and retrieve the same instances for the same name, so deletion can be
125 done with refcounting. Also now throws some kind of error if you
126 don't actually get the name you requested, unlike previously...
128 * test/python/test-client.py: Add tests for instance caching of buses
129 and bus name objects.
131 2005-11-04 Robert McQueen <robot101@debian.org>
133 * python/dbus_bindings.pyx, test/python/test-client.py: Fix
134 marshalling of boolean values. Add some booleans to the values in
137 * python/decorators.py, python/service.py: Add an 'async_callbacks'
138 argument to the dbus.service.method decorator, which allows you to
139 name arguments to take two callback functions for replying with
140 return values or an exception.
142 * test/python/test-client.py, test/python/test-service.py: Add test
143 case using asynchronous method reply functions, both return values and
144 errors, and from within both the function itself and from a mainloop
147 * python/decorators.py, python/service.py: Perform checking that the
148 number of method/signal arguments matches the number of types in the
149 signature at class loading time, not when you first introspect the
152 * python/service.py: Remove debug print left by the last commit.
154 2005-11-03 Robert McQueen <robot101@debian.org>
156 * python/service.py: Heavy refactoring of method invocation, with
157 hopefully no effect on functionality. Nuked _dispatch_dbus_method_call
158 in favour of a new _message_cb that uses seperate functions for
159 looking up the method to call, marshalling the return values, and
160 sending exceptions as errors, and is easier to follow as a
161 consequence. Fixes some corner cases about returning things that
162 don't match your declared out_signature, allows exceptions to define
163 _dbus_error_name and have it be sent over the bus as the error name,
164 and paves the way for cool stuff like heeding the message no reply
165 flag, asynchronous method implementations, informing the method of the
166 sender, and including backtraces in the error messages.
168 * test/python/test-client.py: Catch and print exceptions thrown in the
169 async callback tests, rather than passing them to the low-level
170 bindings to be ignored in a noisy and frustrating manner.
172 2005-11-03 Robert McQueen <robot101@debian.org>
174 * python/_dbus.py, python/proxies.py, python/service.py: Add __repr__
175 functions to dbus.Bus, dbus.service.BusName and dbus.service.Object,
176 tweak others to be consistent.
178 * test/python/test-client.py: Tweak output of testInheritance.
180 2005-10-29 Robert McQueen <robot101@debian.org>
182 * python/service.py: Major changes to allow multiple inheritance
183 from classes that define D-Bus interfaces:
185 1. Create a new Interface class which is the parent class of
186 Object, and make the ObjectType metaclass into InterfaceType.
188 2. Patch written with Rob Taylor to replace use of method_vtable
189 with code that walks the class's __MRO__ (method resolution order)
190 to behave like Python does when invoking methods and allow
191 overriding as you'd expect. Code is quite tricky because
192 we have to find two methods, the one to invoke which has the
193 right name and isn't decorated with the /wrong/ interface,
194 and the one to pick up the signatures from which is decorated
195 with the right interface.
197 The same caveats apply as to normal multiple inheritance -
198 this has undefined behaviour if you try and inherit from two
199 classes that define a method with the same name but are
200 decorated with different interfaces. You should decorate
201 your overriding method with the interface you want.
203 3. Replace grungy introspection XML generation code in the metaclass
204 with dictionaries that cope correctly with multiple inheritance
205 and the overriding of methods. This also uses the signature
206 decorations to provide correct introspection data, including
207 the debut appearance of the types of your return values. :D
209 * test/python/test-client.py, test/python/test-service.py: Add a test
210 case to try invoking an method that overrides one inherited from a
211 D-Bus interface class.
213 2005-10-29 Robert McQueen <robot101@debian.org>
215 * python/dbus_bindings.pyx: Tweak 'raise AssertionError' to assert().
216 Add checking for the end of struct character when marshalling a
217 struct in MessageIter.append_strict.
219 * python/examples/example-service.py,
220 python/examples/gconf-proxy-service.py,
221 python/examples/gconf-proxy-service2.py: Update to use gobject
222 mainloop directly rather than appearing to depend on gtk.
224 * python/test/test-client.py, python/test/test-server.py: Remove
225 obsolete and broken test scripts for old bindings. We have up to date
226 and working tests in test/python/.
228 2005-10-29 Robert McQueen <robot101@debian.org>
230 * python/decorators.py: Add optional arguments to the method and
231 signal decorators to allow you to specify the signature of arguments
232 and return values. Preserve the doc strings of signal functions in the
233 decorated version, for pydoc and friends.
235 * python/dbus_bindings.pyx, python/proxies.py: Replace the
236 parse_signature_block function with an iterable dbus.Signature()
237 type. Fix a bug in MessageIter.append_strict where you could append
238 anything by claiming it was a string.
240 * python/service.py: Use the out_signature decoration on methods to
241 marshal return values, meaning you no longer require dbus.Array()
242 or dbus.Dictionary() to indicate the type when returning empty
243 arrays or dictionaries. Fix a bug where exceptions which are defined
244 in __main__ are not turned into error replies.
246 * test/python/test-client.py, test/python/test-service.py: Add test
247 for correct marshalling of return values according to out_signature.
248 Fix a bug in the async call test where the error_handler is missing a
251 2005-10-29 Robert McQueen <robot101@debian.org>
253 * glib/Makefile.am, glib/examples/Makefile.am,
254 glib/examples/statemachine/Makefile.am: Merge patch from Ubuntu by
255 Daniel Stone to replace explicit calls to libtool with $(LIBTOOL).
257 * test/python/.cvsignore: Add run-with-tmp-session-bus.conf.
259 * tools/dbus-monitor.1, tools/dbus-monitor.c: Merge dbus-monitor patch
260 from Ubuntu by Daniel Silverstone to allow specifying match rules on
263 2005-10-27 Ross Burton <ross@openedhand.com>
265 * dbus/dbus-marshal-header.c:
268 * glib/dbus-gobject.c:
269 Stop compiler warning.
271 2005-10-25 Ross Burton <ross@openedhand.com>
274 * dbus/dbus-server-unix.c:
275 * dbus/dbus-transport-unix.c:
277 * glib/dbus-gobject.c:
278 Add some const keywords.
280 2005-10-25 Ross Burton <ross@openedhand.com>
282 * doc/dbus-specification.xml:
283 Document the NoReply annotation.
285 * glib/dbus-binding-tool-glib.h:
286 * glib/dbus-binding-tool-glib.c:
287 Respect the NoReply annotation.
289 2005-10-24 Robert McQueen <robot101@debian.org>
291 * python/dbus_bindings.pyx (String, MessageIter): make D-Bus strings
292 derive from unicode instead of str, and encode/decode UTF-8 when
293 marshalling/unmarshalling bus messages
295 * python/introspect_parser.py: encode introspection data as UTF-8
296 before passing the buffer into libxml2
298 * test/python/test-client.py: add unicode test strings
300 * test/data/valid-service-files/.cvsignore, test/python/.cvsignore:
301 ignore generated python test files
303 2005-10-17 John (J5) Palmieri <johnp@redhat.com>
305 * glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdouble
306 and G_TYPE_VALUE_ARRAY (DBUS_TYPE_STRUCT)
307 (gvalue_from_hash_value, hash_value_from_gvalue): handle gdouble
309 * glib/dbus-gvalue.c (dbus_gvalue_to_signature): add missing
310 DBUS_STRUCT_BEGIN_CHAR and DBUS_STRUCT_END_CHAR charaters
311 when constructing struct signatures
313 * python/_dbus.py (Bus): handle private connections using the
314 private keyword in the constructor. defaults to private=False
315 (Bus::close): new method to close a connection to the bus
317 * python/dbus_bindings.pyx (Connection::close): renamed method
318 was previously called disconnect
319 (bus_get): now supports getting a private connection
321 * python/proxies.py (ProxyMethod::__call__): check if ignore_reply
322 keyword is set to True. if it is, execute the method without waiting
324 (ProxyObject::_introspect_execute_queue): new method for executing
325 all the pending methods that were waiting for the introspect to
326 finish. this is called when introspect either succeeds or fails
327 (ProxyObject::_introspect_error_handler): call queued methods
329 2005-10-14 John (J5) Palmieri <johnp@redhat.com>
331 * python/dbus_bindings.pyx (MessageIter::append_strict): check for
332 STRUCT_BEGIN not TYPE_STRUCT in indicate we are marshalling a struct
334 * python/service.py (Object::_message_cb): handle exceptions correctly
335 by sending them over the wire to the calling app. This makes sure
336 the client returns immediately instead of waiting the 15 seconds to
339 * test/python/test-client.py (TestDBusBindings::testBenchmarkIntrospect):
340 Add a test to benchmark how long it takes to introspect a service and
341 call a method which returns a large element (pretty fast)
343 * test/python/test-service.py (TestObject::GetComplexArray): new test
344 method which pushes a lot of data
346 2005-10-13 John (J5) Palmieri <johnp@redhat.com>
348 * python/service.py(ObjectType::_reflect_on_signal, _reflect_on_method):
349 reclaim memory outside of the loop and use del istead of just setting
352 2005-10-13 John (J5) Palmieri <johnp@redhat.com>
354 * python/service.py (ObjectType::_reflect_on_signal): Always close
355 signal tag even when there are no arguments
357 2005-10-13 John (J5) Palmieri <johnp@redhat.com>
359 * configure.in: Set mono, mono-docs and Qt3 to default
360 to no instead of auto when building. These bindings do not
361 have full time maintainers and will not be supported for the
364 2005-10-12 John (J5) Palmieri <johnp@redhat.com>
366 patches from Michael Krivoruchko <misha at sun.com>:
368 * dbus/dbus-connection.c (_dbus_connection_queue_received_message_link,
369 _dbus_connection_message_sent,
370 _dbus_connection_send_preallocated_unlocked_no_update,
371 _dbus_connection_pop_message_link_unlocked): handle the case when path
372 is NULL when calling _dbus_verbose
374 * configure.in: check for functions getpeerucred and getpeereid
376 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): provides
377 support of auth EXTERNAL on Solaris 10+ (getpeerucred), FreeBSD 4.6+,
378 OpenBSD 3.0+ and FreeBSD 5.0+ as well as MacOSX 10.2+ (getpeereid).
379 Patch was only tested on Solaris 10 x86 so it might be issues
380 with other platforms (i.e. BSDs and MacOSX)
383 2005-10-05 John (J5) Palmieri <johnp@redhat.com>
385 * glib/dbus-gvalue.c (marshal_variant): call _dbus_gvalue_marshal
386 instead of marshal basic so we can handle recursive types in a variant
388 * test/glib/test-dbus-glib.c: Add test for marshaling recurive types
391 * test/glib/test-service-glib.c, test-service-glib.xml
392 (my_object_echo_variant [EchoVariant],
393 my_object_process_variant_of_array_of_ints123
394 [ProcessVariantOfArrayOfInts123]):
397 * python/introspect_parser.py: New module for parsing introspect
400 * python/dbus_bindings.pyx:
401 (various places): when throwing errors fix to use errormsg instead
402 of message local variable because Pyrex can get confused with other
403 message variables (initial patch by Robert McQueen
404 <robert.mcqueen at collabora.co.uk>)
405 (MessageIter::parse_signature_block): new method for getting the next
406 block in a signiture.
407 (MessageIter::append_strict): new method for appending values strictly
408 using the passed in signature instead of guessing at the type
409 (MessageItter:: append_dict, append_struct, append_array): use
410 signatures to marshal children if the signature is available
412 * python/exceptions.py (IntrospectionParserException): new exception
414 * python/proxies.py (ProxyMethod::__call__): Marshal args with
415 introspected signatures if available, else we fall back to the
416 old way of doing things.
417 (ProxyObject::_introspect_reply_handler ): parse introspection data
419 * python/service.py (ObjectType::_reflect_on_method): Properly
420 terminate <method> if there are no args in the reflection data
422 * test/python/test-client.py: add tests for talking with the GLib
423 test server. This gives us better coverage for introspection since
424 python to python will always generate arguments as variants. It also
425 allows us to test the robustness of the GLib bindings and interlanguage
429 2005-10-03 John (J5) Palmieri <johnp@redhat.com>
431 * bus/driver.c (bus_driver_handle_introspect): Add signals
432 to the introspect data. (patch from Daniel P. Berrange
433 <dan at berrange.com>)
435 * bus/dispatch.c (check_existent_ping): Add testcase for Ping
437 * dbus/dbus-connection.c (_dbus_connection_peer_filter,
438 _dbus_connection_run_builtin_filters): Changed these to
439 be unlock_no_update functions and call
440 _dbus_connection_send_unlocked_no_update instead of
441 dbus_connection_send to avoid locking errors.
443 * doc/TODO: Removed the make Ping test TODO
445 2005-09-26 John (J5) Palmieri <johnp@redhat.com>
447 * dbus/Python.pyx: Fixed memory leaks when throwing errors.
448 We now copy the message from a DBusError and then free
449 the error object befor throwing the error
451 * glib/dbus-glib-tool.c: removed extra comma at the end of the
452 DBusBindingOutputMode enum which was causing a warning.
453 #include <time.h> so using time_t is explicitly defined
455 2005-09-26 John (J5) Palmieri <johnp@redhat.com>
457 * Integrate patches from Lennart Poettering <mzsqb at 0pointer.de>:
459 (internal_bus_get): new method that take over the heavy lifting
460 of dbus_bus_get and adds the ability to get a private connection
462 (dbus_bus_get): wrapper to internal_bus_get that provides the same
463 interface as in previous versions
464 (dbus_bus_get_private): new method that is a wrapper to
465 internal_bus_get to get a private connection to the bus
468 (dbus_bus_get_private): add as a public libdbus interface
470 - dbus-1.pc.in: output system_bus_default_address and
471 sysconfdir variables so apps can use them when compiling
473 2005-09-23 Harald Fernengel <harry@kdevelop.org>
474 * dbus/qt: New Qt bindings
476 2005-09-12 Waldo Bastian <bastian@kde.org>
478 * dbus/dbus-marshal-validate.c,
479 doc/dbus-specification.xml, test/Makefile.am,
480 test/test-names.c: allow hyphens in bus names.
482 2005-09-11 Mark McLoughlin <mark@skynet.ie>
484 * test/data/auth/fallback.auth-script: we don't
485 retry the EXTERNAL method when we know its going
488 2005-09-11 Mark McLoughlin <mark@skynet.ie>
490 * dbus/dbus-connection-internal.h: rename
491 (add|remove|toggle)_(watch|timeout) to unlocked()
493 * dbus/dbus-connection.c: ditto.
495 * dbus/dbus-timeout.c, dbus/dbus-transport-unix.c:
496 Update some callers for the renaming.
498 2005-09-10 Mark McLoughlin <mark@skynet.ie>
500 * dbus/dbus-auth.c: (record_mechanisms): don't
501 retry the first auth mechanism because we know
502 we're just going to get rejected again.
504 * dbus/dbus-keyring.c: (_dbus_keyring_reload):
505 Fix thinko ... and what a nasty little bugger to
506 track down you were ...
508 * dbus/dbus-connection.c:
509 (_dbus_connection_add_watch),
510 (_dbus_connection_remove_watch): add note about
511 these needing the connection to be locked.
512 (_dbus_connection_get_dispatch_status_unlocked):
513 set status to DATA_REMAINS when we queue the
514 disconnected message.
517 (bus_dispatch): fix warning.
518 (check_existent_service_no_auto_start):
519 Expect ChildSignaled error too.
520 (check_existent_hello_from_self): fix another
523 2005-09-08 Joe Shaw <joeshaw@novell.com>
525 Patches from James Willcox <snorp@snorp.net>
527 * mono/Makefile.am: Add Int16.cs and UInt16.cs
529 * mono/DBusType/Array.cs: Handle multidimensional arrays, and
530 support array "out" parameters.
532 * mono/DBusType/Int16.cs, mono/DBusType/UInt16.cs: New files,
533 for 16-bit int support.
535 2005-09-06 John (J5) Palmieri <johnp@redhat.com>
539 * Patch from Steve Grubb:
540 - bus/activation.c (bus_activation_service_reload_test): clean up
542 - dbus/dbus-keyring.c (_dbus_keyring_reload): fix conditional
543 - dbus/dbus-message-factory.c (generate_special): fix a couple of
544 buffer overflows in the test suite. This is non critical because
545 it can not be exploited and this code is only run when doing a
548 * Patch from Yaakov Selkowitz: Build fixes for Cygwin
549 - configure.in: Don't check and link against kdecore, only qt headers
550 - dbus/Makefile.am: Add -no-undefined to libdbus_1_la_LDFLAGS
551 - gcj/org/freedesktop/dbus/Makefile.am:
552 add libdbus_gcj_1_la_LDFLAGS = -no-undefined
553 - glib/Makefile.am: Add -no-undefined to libdbus_glib_1_la_LDFLAGS
554 and $(DBUS_GLIB_LIBS) to dbus_binding_tool_LDADD
555 - qt/Makefile.am: Add -no-undefined to libdbus_qt_1_la_LDFLAGS
556 - tools/Makefile.am: Add platform extentions to binaries
557 (i.e. .exe on windows)
560 - Make it so if no suitable version of python is found we only
561 disable building python instead of exiting the configure script
562 - Require version 2.4 of glib for glib bindings
565 * python/__init__.py: Sync version with libdbus to (0,50,0)
567 2005-09-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
569 * dbus/dbus-object-tree.c (find_subtree_recurse):
570 a couple of optimizations (bug #710):
571 - do a binary search in the tree
572 - insert a new child at the right place directly, no need for
574 - do the "double alloc" thing when allocating children
576 2005-08-31 John (J5) Palmieri <johnp@redhat.com>
578 * python/Makefile.am: Break on pyrexc errors instead of ignoring them
580 * python/dbus_bindings.pyx: Memory management foo
581 (global): remove hacky _user_data_references global list
582 (GIL_safe_cunregister_function_handler): userdata now stuffed into
583 tuples. Unref user_data
584 (GIL_safe_cmessage_function_handler): userdata now stuffed into tuples
585 (Connection::__del__): Remove and replace with __dealloc__ method
586 (Connection::add_filter): Stuff user_data into a tuple. Use Py_INCREF
587 to keep tuple from being deallocated instead of the global var hack
588 (Connection::register_object_path): Stuff user_data into a tuple.
589 Use Py_INCREF to keep tuple from being deallocated instead of the
591 (Connection::register_fallback): Stuff user_data into a tuple.
592 Use Py_INCREF to keep tuple from being deallocated instead of the
594 (GIL_safe_pending_call_notification): Don't unref the message
595 because it gets unreffed when going out of scope. Py_XDECREF
597 (PendingCall::__del__): Remove and replace with __dealloc__ method
598 (PendingCall::set_notify): ref the pending call because we will
599 need it to stick around for when the notify callback gets called
600 (Message::__del__): Remove and replace with __dealloc__ method
602 * python/dbus_glib_bindings.pyx (init_gthreads): Changed to
603 gthreads_init to match up with the dbus call
605 * python/glib.py (init_threads): Changed to threads_init to match
606 up with gobject.threads_init(). init_threads is kept for backwards
607 compat but will most likely be deprecated in the future
609 * test/python/test-client.py:
610 - revamp to use Python's unittest functionality
611 - add async call tests
612 - setup threads in glib and dbus so we make sure locks are working
614 2005-08-30 John (J5) Palmieri <johnp@redhat.com>
616 * python/dbus_bindings.pyx
617 (_pending_call_notification, cunregister_function_handler,
618 cmessage_function_handler): All callback functions have been rearranged
619 to workaround a bug in Pyrex when working with the GIL which is Python's
620 global lock when dealing with threads. They have been split into
621 a wrapper function (which assumes the name of the old function) and
622 a _GIL_safe_<function name> function which contains the functionality
623 of the old function. This ensures that Pyrex does not write code
624 the lock is released.
627 2005-08-30 John (J5) Palmieri <johnp@redhat.com>
629 * python/dbus_bindings.pyx (_pending_call_notification): Obtain the
630 GIL global lock when calling back into Python
632 2005-08-29 John (J5) Palmieri <johnp@redhat.com>
636 * Add Havoc's patch that never got applied to HEAD (Bug #2436):
638 * bus/policy.c (bus_policy_allow_user): change default "user is
639 allowed" to be "user has same uid as the bus itself"; any
640 allow/deny rules will override.
642 * bus/session.conf.in: don't allow all users, since now by default
643 the user that ran the bus can connect.
645 2005-08-26 Colin Walters <walters@verbum.org>
647 * tools/dbus-print-message.c (print_message): Flush stdout
648 after printing a message, so that redirecting to a file, then
649 hitting Ctrl-C works.
651 2005-08-25 John (J5) Palmieri <johnp@redhat.com>
653 * python/dbus_bindings.pyx: Tracked down a major memleak and fixed it
654 (EmptyMessage): new class that subclasses Message. This is a workaround
655 to a Pyrex bug that fails to call __del__ when the Message object goes out
656 of scope. For some reason subclassing Message fixes this bug
657 (Bus::send_with_reply_and_block): use EmptyMessage instead of Message
658 - s/Message(_create=0)/EmptyMessage everywhere else
660 * test/python/test-{server|client}.py: add the python/.libs directory
661 to the lookup path so dbus_bindings and dbus_glib_bindings don't
662 get picked up from the system
664 2005-08-25 Colin Walters <walters@verbum.org>
666 * glib/dbus-gproxy.c (dbus_g_proxy_call): Doc update, thanks
667 to Ryan Lortie for the suggestion.
669 2005-08-24 John (J5) Palmieri <johnp@redhat.com>
671 * test/python: Add python regression test
673 * configure.in: Add test/python/Makefile
675 * test/Makefile.am: Add the python directory to SUBDIRS
677 2005-08-24 John (J5) Palmieri <johnp@redhat.com>
682 (Interface::connect_to_signal): propigate keywords for match on args
683 (Bus::add_signal_receiver): Fix typo s/dbus_inteface/dbus_interface
685 * python/proxies.py (ProxyObject::connect_to_signal):
686 propigate keywords for match on args
688 * Makefile.am: point everything to pyexecdir since python borks
691 2005-08-23 John (J5) Palmieri <johnp@redhat.com>
695 2005-08-23 Colin Walters <walters@verbum.org>
697 * test/glib/Makefile.am: Don't multiply-define EXTRA_DIST.
699 2005-08-23 John (J5) Palmieri <johnp@redhat.com>
701 * python/dbus_glib_bindings.pyx: reorder imports and c definitions
702 to fix some wranings. We now use dbus_bindings.DBusConnection instead
703 of defining DBusConnection ourselves.
705 2005-08-18 John (J5) Palmieri <johnp@redhat.com>
707 * python/dbus.pth: New path file to fix up problems when installing
708 c libraries to lib64 and python files to lib.
710 * python/Makefile.am: install dbus.pth in the correct spot
712 2005-08-17 John (J5) Palmieri <johnp@redhat.com>
713 * ChangeLog: clean up my last entry a bit
715 * doc/introspect.xsl: New stylesheet for converting introspection data
716 into browser renderable xhtml. Contributed by Lennart Poettering.
718 * doc/introspect.dtd: Fixups in the introspect format from Lennart
721 * doc/dbus-tutorial.xml:
722 - Add Colin Walter to the Authors section for authoring the GLib
724 - Add descriptions of the new signature and type functionality
725 in the Python complex type mapping section
726 - Add a sidenote on the new args matching functionality in
728 - Fixed up some of the examples to use the gobject.MainLoop
732 (Bus::_create_args_dict): New. Converts a hash of arg matches
733 to a more useable format
734 (Bus::add_signal_receiver): add a **keywords parameter for catching
736 (Bus::remove_signal_receiver): add a **keywords parameter for catching
739 * python/matchrules.py:
740 (MatchTree::exec_matches): Check for arg matches
741 (SignalMatchRule::add_args_match): New method
742 (SignalMatchRule::execute): Added args_list parameter as an optimization
743 so we don't have to marshal the args more than once
744 (SignalMatchRule::match_args_from_list): New method that checks to see
745 if the rule's arg matches match an argument list. Only arguments
746 set in the rule are checked.
747 (SignalMatchRule::match_args_from_rule): New method that checks to see
748 if the rule's arg matches match another rule's. All args have to match
749 in order for this method to return true. If either rule has more args
750 then it is not a match.
751 (SignalMatchRule::is_match): Add args match
752 (SignalMatchRule::repr): Add args to the final output if they exist
754 2005-08-17 Ross Burton <ross@burtonini.com>
756 * glib/dbus-gproxy.c:
757 (dbus_g_proxy_call_no_reply): unref the message once sent.
758 (dbus_g_proxy_call): protect against NULL proxy.
760 2005-08-16 John (J5) Palmieri <johnp@redhat.com>
762 * python/__init__.py: Version updated (0, 43, 0)
764 * python/dbus_bindings.pyx:
765 - Fixed type objects to have self passed into __init__
766 - Added the Variant type
767 - Add the ability to specify types or signatures for Array, Variant
769 (Connection::send_with_reply_handlers): return a PendingCall object
770 (_pending_call_notification): handle the case when an error is returned
771 without an error message in the body
772 (MessageIter::get_boolean): return True or False instead of an integer
773 (MessageIter::python_value_to_dbus_sig): add direct checking of types
774 and add checks for objects with embeded signatures or types (Array,
775 Variant and Dictionary)
776 (MessageIter::append_byte): handle case when the value is a dbus.Byte
777 (MessageIter::append_dict): handle embeded types or signatures
778 (MessageIter::append_array): handle embeded types or signatures
779 (MessageIter::append_variant): new method
782 (DeferedMethod): New. Dummy executable object used when queuing calls
783 blocking on introspection data
784 (ProxyMethod::__call__): add the timeout keyword for specifying longer
785 or shorter timeouts for method calls
786 (ProxyObject): Add first pass at an introspection state machine
787 (ProxyObject::__init__): Add introspect keyword for turing off an on
789 (ProxyObject::_Introspect): Internal Introspect call that bypasses
790 the usual mechanisms for sending messages. This is to avoid a deadlock
791 where the Intospect call would be queued waiting for the Introspect
793 (ProxyObject::_introspect_reply_handler): New. This method is called
794 when introspection returns with no error
795 (ProxyObject::_introspect_error_handler): New. This method is called
796 when introspection encounters an error
797 (ProxyObject::__getattr__): Code to handle different introspection
798 states. Queue async calls or block blocking calls if we are
799 introspecting. Pass through as normal if we are not or are done with
802 * python/service.py: Import signal and method from decorators.py
804 * python/types.py: Add Variant type
806 2005-08-16 Colin Walters <walters@verbum.org>
808 * glib/dbus-gobject.c (dbus_set_g_error): Don't lose if the
809 DBusError message is NULL.
811 2005-08-09 Havoc Pennington <hp@redhat.com>
813 * dbus/dbus-errors.c: apply patch from Timo Teras to make a
814 malloc'd copy of the name parameter
816 2005-08-09 Havoc Pennington <hp@redhat.com>
818 * dbus/dbus-message.c (dbus_message_set_reply_serial): print
819 warning if the reply serial is set to 0
821 2005-08-04 Colin Walters <walters@verbum.org>
823 * glib/dbus-gvalue-utils.h (_dbus_g_type_specialized_builtins_init)
824 (dbus_g_type_is_fixed, dbus_g_type_fixed_get_size)
825 (dbus_gvalue_set_from_pointer, dbus_g_hash_table_value_foreach)
826 (dbus_g_hash_table_insert_values, dbus_g_hash_table_insert_steal_values)
827 (dbus_gtype_is_valid_hash_key, dbus_gtype_is_valid_hash_value)
828 (dbus_g_hash_func_from_gtype, dbus_g_hash_free_from_gtype)
829 (dbus_g_hash_equal_from_gtype, dbus_gvalue_stor, dbus_gvalue_take):
830 * glib/dbus-gvalue.h (dbus_g_value_types_init)
831 (dbus_gvalue_demarshal, dbus_gvalue_demarshal_variant)
832 (dbus_gvalue_demarshal_message, dbus_gvalue_marshal):
834 Prefix name with _ to ensure they're not exported. All callers
837 * glib/dbus-gvalue.c (typecode_to_gtype)
838 (dbus_typecode_maps_to_basic, basic_typecode_to_gtype)
839 (signature_iter_to_g_type_dict)
840 (signature_iter_to_g_type_array)
841 (dbus_gtype_from_signature_iter, dbus_gtype_from_signature)
842 (dbus_gtypes_from_arg_signature):
843 Move to dbus-gsignature.c.
845 * glib/dbus-binding-tool-glib.c (dbus_binding_tool_output_glib_server): Call
846 dbus_g_type_specialized_builtins_init instead of dbus_g_value_types_init.
847 (dbus_binding_tool_output_glib_client): Ditto.
849 * glib/Makefile.am (DBUS_GLIB_INTERNALS): Add dbus-gsignature.c
850 and dbus-gsignature.h
852 * test/glib/test-service-glib.c (my_object_rec_arrays): Delete
855 2005-08-03 Colin Walters <walters@verbum.org>
857 * glib/dbus-gobject.c: Add tests on hardcoded object info; this should
858 catch any incompatible changes accidentally made.
860 2005-08-03 Havoc Pennington <hp@redhat.com>
862 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): fix
863 typo, from Julien Puydt
865 * bus/connection.c (bus_connection_disconnected): we were always
866 doing a wait_for_memory due to a buggy loop, found by Timo Hoenig
868 2005-08-01 Colin Walters <walters@verbum.org>
870 Patch from Joe Markus Clarke:
872 * glib/dbus-gidl.c (property_info_unref, arg_info_unref): Fix
875 2005-08-01 Colin Walters <walters@verbum.org>
877 Patch from Joe Markus Clarke:
879 * tools/dbus-send.c (main):
881 Don't use C99 style initializers (bug #3933).
883 2005-08-01 Colin Walters <walters@verbum.org>
885 Patch from Joe Markus Clarke:
887 * glib/dbus-gvalue.c (dbus_g_value_types_init):
888 * glib/dbus-gvalue-utils.c (dbus_g_type_specialized_builtins_init)
889 * glib/dbus-gobject.c (write_interface):
891 Don't use C99 style initializers (bug #3933).
893 2005-07-31 Havoc Pennington <hp@redhat.com>
895 * tools/dbus-viewer.c (load_child_nodes): fix invocation of
896 dbus_g_proxy_call, fix from Piotr Zielinski bug #3920
898 2005-07-30 Havoc Pennington <hp@redhat.com>
900 * fix a bunch of Doxygen warnings and mistakes
902 2005-07-30 Havoc Pennington <hp@redhat.com>
904 * dbus/dbus-sysdeps.c (_dbus_string_parse_uint): remove #ifdef
905 DBUS_BUILD_TESTS since it's now used in production code
907 2005-07-29 Havoc Pennington <hp@redhat.com>
909 * test/glib/test-profile.c (write_junk): initialize the junk
910 buffer so valgrind doesn't have a breakdown
912 2005-07-29 Havoc Pennington <hp@redhat.com>
914 * bus/signals.c (bus_signals_test): add match_rule_equal() tests
915 (match_rule_matches): remove unused arg
916 (test_matching): add tests for match_rule_matches()
918 * bus/signals.c (bus_match_rule_parse_arg_match): add ability to
919 do arg0='foo' arg5='bar' in the match rules
920 (match_rule_matches): don't match if the arg0='foo' doesn't match.
922 * dbus/dbus-protocol.h (DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER): add this
924 2005-07-29 Ross Burton <ross@openedhand.com>
926 * dbus/dbus-connection.c:
927 Don't create a DBusCondVar which is never used.
929 2005-07-27 Ross Burton <ross@openedhand.com>
931 * dbus/dbus-message.c:
932 Reduce the size of the maximum cached message to 10K.
934 2005-07-25 Ross Burton <ross@openedhand.com>
936 * glib/dbus-gproxy.c:
937 Remove matches when all proxies are unregistered.
939 2005-07-24 Colin Walters <walters@verbum.org>
941 * glib/dbus-gvalue.c (signature_iter_to_g_type_array): Don't require
942 typedata; recursive arrays won't have it.
944 * test/glib/test-dbus-glib.c:
945 * test/glib/test-service-glib.c:
946 * test/glib/test-service-glib.xml: Add recursive arrays tests.
948 2005-07-20 John (J5) Palmieir <johnp@redhat.com>
950 * python/_dbus.py, _util.py, decorators.py, extract.py, matchrules.py.
951 proxies.py, service.py: Cleanup of code after running it through the
952 pyflakes code checker mostly dealing with undefined names.
953 (Bug #3828, Patch from Anthony Baxter <anthony@interlink.com.au>)
955 2005-07-17 John (J5) Palmieri <johnp@redhat.com>
957 * NEWS: Update to 0.35.2
959 2005-07-17 John (J5) Palmieri <johnp@redhat.com>
961 * python/_dbus.py: Remove import of the dbus.services
962 module as it no longer exists (patch from Dimitur Kirov)
964 * python/service.py (Object::__init__): Fixed typo
965 s/name/bus_name (patch from Dimitur Kirov)
967 * python/examples/example-signal-emitter.py: import dbus.glib
968 to get the main loop and use glib mainloop instead of gtk so
969 X doesn't have to be running.
971 * python/examples/example-signal-recipient.py: import dbus.glib
972 to get the main loop and use glib mainloop instead of gtk so
973 X doesn't have to be running. Import the decorators module
976 * test/glib/Makefile.am: Added DIST_EXTRA files that distcheck
977 didn't pick up on but are needed to build
979 * configure.in: upped version to 0.35.2
981 * bus/driver.c, bus/selinux.c, bus/selinux.h, dbus/dbus-protocol.h:
982 added Colin Walters' SELinux API rename patch from head
983 s/unix sercurity context/selinux security context/
985 2005-07-16 John (J5) Palmieri <johnp@redhat.com>
987 * python/Makefile.am: dbus_binding.pxd.in should be included
988 in EXTRA_DIST not dbus_binding.pxd
989 fix up $(srcdir) hopefully for the last time
991 * NEWS: Update to 0.35.1
993 2005-07-16 Colin Walters <walters@verbum.org>
995 * bus/driver.c (bus_driver_handle_get_connection_selinux_security_context): Renamed
996 from bus_driver_handle_get_connection_unix_security_context. Update for
998 (message_handlers): Update for renames.
1000 * bus/selinux.c (bus_selinux_allows_send): Handle OOM on
1001 _dbus_string_init failure correctly.
1002 (bus_selinux_append_context): Convert SID to context. Append it
1004 (bus_selinux_shutdown): Handle the case where bus_selinux_full_init
1007 * bus/selinux.h: Update prototype.
1009 * dbus/dbus-protocol.h (DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN): Renamed
1010 from DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN.
1012 2005-07-15 Colin Walters <walters@verbum.org>
1014 * doc/TODO: Add note about convenience wrappers.
1016 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
1018 * NEWS: Update to 0.35
1020 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
1022 * glib/Makefile.am: Add make-dbus-glib-error-switch.sh to EXTRA_DIST
1023 so distcheck doesn't fail
1025 * glib/examples/Makefile.am: Add example-service.xml and
1026 example-signal-emitter.xml to EXTRA_DIST so distcheck doesn't fail
1028 * glib/examples/statemachine/Makefile.am: Add statemachine.xml and
1029 statemachine-server.xml to EXTRA_DIST so distcheck doesn't fail
1031 * python/Makefile.am: Preprend $(srcdir)/ to source files so the
1032 compiler looks in the right places during distcheck
1034 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
1036 * glib/example/Makefile.am: Fix a typo which cause make distcheck
1039 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
1041 * python/examples/example-service.py,
1042 python/examples/example-signal-emitter.py: Fixed up examples
1045 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
1047 * python/__init__.py: Upped to version (0,42,0) because of
1050 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
1052 * ChangeLog: fix date in last entry
1054 * configure.in, bus/system.conf.in: add the ability to configure
1055 the system bus user at compiletime with the --with-dbus-user flag
1056 (patch from Kristof Vansant)
1058 2005-07-15 John (J5) Palmieri <johnp@redhat.com>
1060 * bus/dispatch.c, test/test-service.c: Add testcase
1061 for sending messages to oneself (TODO item).
1063 * python/service.py (class Object): Swap ordering of bus_name
1064 and object_path parameters to better support inheritance.
1066 * doc/dbus-tutorial.xml: change Python docs to reflect change
1067 in parameter ordering and fix the inheritance section.
1069 * doc/TODO: remove sending message to oneself TODO item
1071 2005-07-15 Ross Burton <ross@openedhand.com>
1073 * glib/dbus-gproxy.c:
1074 Fix a leak when calling methods via the proxy.
1076 2005-07-15 Colin Walters <walters@verbum.org>
1078 * bus/selinux.c (bus_selinux_append_context): Wrap in
1081 2005-07-14 John (J5) Palmieri <johnp@redhat.com>
1083 * python/_dbus.py (Bus::remove_signal_receiver):
1084 don't add a callback to the match if none has been passed in
1086 * python/matchrules.py (SignalMatchTree::remove): if the rule
1087 being matched does not have a callback treat it as a wildcard
1090 * doc/dbus-tutorial.xml: Add Python tutorial
1092 2005-07-14 Colin Walters <walters@verbum.org>
1095 (bus_driver_handle_get_connection_unix_security_context): New function.
1096 (message_handlers): Add.
1098 * bus/selinux.c (bus_selinux_append_context): New function; appends
1099 security context to message.
1101 * bus/selinux.h: Prototype.
1103 * dbus/dbus-protocol.h (DBUS_ERROR_UNIX_SECURITY_CONTEXT_UNKNOWN): New.
1105 2005-07-14 John (J5) Palmieri <johnp@redhat.com>
1107 * bus/activation.c: clean up all tabs to be 8 spaces
1108 (bus_activation_activate_service): make sure we clean up
1111 * bus/dispatch.c: clean up all tabs to be 8 spaces
1112 (check_shell_fail_service_auto_start): New function
1113 tests to make sure we get fail properly when trying to auto start a service
1114 with a faulty command line
1115 (check_shell_service_success_auto_start): New function tests to make sure
1116 auto started services get the arguments on the command line
1118 * test/test-shell-service.c: Added service for testing auto-starting with
1119 command line arguments
1121 * test/data/valid-service-files/debug-shell-echo-fail.service.in,
1122 test/data/valid-service-files/debug-shell-echo-success.service.in:
1123 Added service files for testing auto-starting with command line arguments
1125 * */.cvsignore: added a bunch of generated files to various .cvsignore files
1127 2005-07-14 Rodrigo Moya <rodrigo@novell.com>
1129 * dbus/dbus-shell.[ch]: copy/pasted code from GLib.
1131 * dbus/Makefile.am: added new files to build.
1133 * bus/activation.c (bus_activation_activate_service): support
1134 activation commands with parameters.
1136 * test/shell-test.c: added test program for the shell parsing
1139 2005-07-13 David Zeuthen <davidz@redhat.com>
1141 * tools/dbus-send.c (append_arg, type_from_name): Also support 16 and
1142 64 bit signed and unsigned parameters
1144 2005-07-13 John (J5) Palmieri <johnp@redhat.com>
1146 * python/.cvsignore: remove dbus_bindings.pyx, add dbus_bindings.pxd
1148 * python/service.py (class Name): renamed BusName to make it clearer
1149 what the object is for (a name on the bus)
1151 * python/examples/example-service.py,
1152 python/examples/example-signal-emitter.py: change the Name object to
1155 2005-07-12 Colin Walters <walters@verbum.org>
1157 Patch from Jim Gettys <Jim.Gettys@hp.com>.
1159 * tools/dbus-launch.c: Include sys/select.h.
1161 2005-07-12 John (J5) Palmieri <johnp@redhat.com>
1162 * python/dbus_bindings.pyx.in: removed
1164 * python/dbus_bindings.pyx: Added.
1165 - Fixed some memleaks (patch from
1166 Sean Meiners <sean.meiners@linspireinc.com>)
1167 - Broke out the #include "dbus_h_wrapper.h" and put it in its
1168 own pxd file (Pyrex definition)
1169 - Broke out glib dependancies into its own pyx module
1171 * python/dbus_bindings.pdx: Added.
1172 - Defines C class Connection for exporting to other modules
1174 * python/dbus_glib_bindings.pyx: Added.
1175 - New module to handle lowlevel dbus-glib mainloop integration
1177 * python/glib.py: Added.
1178 - Registers the glib mainloop when you import this module
1180 * python/services.py: Removed (renamed to service.py)
1182 * python/service.py: Added.
1183 - (class Server): renamed Name
1185 * python/__init__.py: Bump ro version (0,41,0)
1186 -don't import the decorators or service module
1187 by default. These now reside in the dbus.service namespace
1189 * python/_dbus.py (Bus::__init__): Add code run the main loop
1190 setup function on creation
1192 * python/examples/example-service.py,
1193 python/examples/example-signal-emitter.py: update examples
1195 * python/examples/gconf-proxy-service.py,
1196 python/examples/gconf-proxy-service2.py: TODO fix these up
1198 * doc/TODO: Addition
1199 - Added a Python Bindings 1.0 section
1200 - added "Add match on args or match on details to match rules"
1203 2005-07-12 Colin Walters <walters@verbum.org>
1205 * glib/examples/statemachine/Makefile.am (statemachine-server-glue.h)
1206 (statemachine-glue.h):
1207 * glib/examples/Makefile.am (example-service-glue.h)
1208 (example-signal-emitter-glue.h):
1209 * glib/Makefile.am (dbus-glib-error-switch.h):
1210 Add libtool --mode=execute so we use the built library instead
1211 of any installed one.
1213 2005-07-11 Colin Walters <walters@verbum.org>
1215 * glib/dbus-gvalue.c (struct _DBusGValue): Delete.
1216 (dbus_g_value_types_init): Remove assertion.
1217 (dbus_g_value_get_g_type, dbus_g_value_open)
1218 (dbus_g_value_iterator_get_values, dbus_g_value_get_signature)
1219 (dbus_g_value_copy, dbus_g_value_free): Delete unimplemented
1220 functions related to DBusGValue. Now we marshal/demarshal
1221 structures as GValueArray.
1222 (dbus_gtype_from_signature_iter): Return G_TYPE_VALUE_ARRAY for
1224 (signature_iter_to_g_type_array): Don't call
1225 signature_iter_to_g_type_struct.
1226 (signature_iter_to_g_type_struct): Delete.
1227 (dbus_gvalue_to_signature): Delete.
1228 (dbus_gvalue_to_signature): New function with same name as other
1229 one; we can convert structures to signatures.
1230 (demarshal_valuearray): New function.
1231 (get_type_demarshaller): Use it.
1232 (demarshal_recurse): Delete.
1233 (marshal_proxy): New function.
1234 (marshal_map): Warn if we can't determine signature from type.
1235 (marshal_collection_ptrarray): Ditto.
1236 (marshal_collection_array): Ditto.
1237 (get_type_marshaller): Use marshal_valuearray.
1238 (marshal_recurse): Delete.
1239 (_dbus_gvalue_test): Add some tests.
1241 * dbus/dbus-glib.h (struct _DBusGValueIterator):
1242 (dbus_g_value_get_g_type, DBUS_TYPE_G_VALUE)
1243 (dbus_g_value_open, dbus_g_value_iterator_get_value)
1244 (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
1245 (dbus_g_value_free): Remove prototypes.
1247 * glib/dbus-binding-tool-glib.c (dbus_g_type_get_lookup_function): Handle
1250 * glib/examples/example-service.c:
1251 * glib/examples/example-client.c: Implement GetTuple.
1253 * test/glib/test-dbus-glib.c:
1254 * test/glib/test-service-glib.c:
1255 * test/glib/test-service-glib.xml: Add structure tests.
1257 2005-07-10 Colin Walters <walters@verbum.org>
1259 * doc/TODO: Knock off some GLib items with this patch.
1261 * glib/dbus-gvalue-utils.c (_dbus_gtype_can_signal_error)
1262 (_dbus_gvalue_signals_error): New functions.
1264 * glib/dbus-gvalue-utils.h: Prototype them.
1266 * glib/dbus-gobject.c (arg_iterate): Update to handle return vals
1267 and change to not output const/retval flags for input args. All
1269 (invoke_object_method): Refactor to handle return values. Add
1270 some more comments in various places. Remove debug g_print.
1272 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_RETURNVAL): New.
1274 * glib/dbus-binding-tool-glib.c (dbus_g_type_get_marshal_name):
1276 (compute_gsignature): New function; refactored from code from
1277 compute_marshaller and compute_marshaller_name. Enhance to
1278 handle return values and async ops more cleanly. Update for
1279 async ops returning NONE instead of BOOLEAN.
1280 (compute_marshaller, compute_marshaller_name): Call compute_gsignature
1281 and output appropriate string.
1282 (generate_glue): Handle return value annotation. Also don't dump
1283 constness flag for input arguments.
1285 * glib/Makefile.am (DBUS_GLIB_INTERNALS): New variable; contains
1286 files shared between installed library and utilities.
1287 (libdbus_glib_1_la_SOURCES): Move some stuf into DBUS_GLIB_INTERNALS.
1288 (libdbus_gtool_la_SOURCES): Suck in DBUS_GLIB_INTERNALS so the
1289 binding tool can access gtype utility functions.
1291 * test/glib/test-service-glib.c:
1292 * test/glib/test-service-glib.xml:
1293 * test/glib/test-dbus-glib.c: Add some tests for return values.
1295 2005-07-09 Colin Walters <walters@verbum.org>
1297 * glib/dbus-gparser.c (parse_annotation): Add annotations to
1298 argument if available, not method.
1300 * glib/dbus-gobject.c (arg_iterate): More verbose warnings.
1301 (invoke_object_method): First, remove some redundant
1302 GValues (object_value, error_value) in favor of working on
1303 array directly. Second, rework constness to be less buggy.
1304 Now we iterate directly over the argument metadata instead
1305 of parallel iterating over output signature and metadata.
1307 * glib/dbus-glib-tool.h: Add INVALID_ANNOTATION error.
1309 * glib/dbus-binding-tool-glib.c (generate_glue): Barf on const
1310 annotation on input args.
1312 2005-07-09 Colin Walters <walters@verbum.org>
1314 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_CONST):
1317 * glib/dbus-binding-tool-glib.c (generate_glue): Handle Const
1320 * glib/dbus-gobject.c (arg_iterate): Update to parse constval too.
1321 (method_dir_signature_from_object_info): Handle arg_iterate change.
1322 (write_interface): Ditto.
1323 (lookup_object_info): Don't barf if format_version is > 0.
1324 (invoke_object_method): Handle arg constness.
1326 * glib/dbus-gidl.c (struct ArgInfo): Add annotations.
1327 (arg_info_new): Create.
1328 (arg_info_unref): Destroy.
1329 (arg_info_get_annotations, arg_info_get_annotation)
1330 (arg_info_add_annotation): New functions.
1332 * glib/dbus-gidl.h: Prototype them.
1334 * glib/dbus-gparser.c (parse_annotation): Allow annotations in
1335 args, disallow them in properties.
1336 (parse_annotation): Handle arg annotations.
1338 * test/glib/test-service-glib.xml:
1339 * test/glib/test-service-glib.c: Update to make some methods
1342 2005-07-08 Colin Walters <walters@verbum.org>
1344 * test/glib/test-service-glib.xml:
1345 * test/glib/test-service-glib.c:
1346 * test/glib/test-dbus-glib.c: Test a{sv}.
1348 * glib/examples/statemachine/statemachine.c:
1349 * glib/examples/statemachine/statemachine-server.c:
1350 * glib/examples/statemachine/statemachine-client.c: Fix some bugs,
1351 add progress bar, etc.
1353 * glib/dbus-gvalue.c (register_array, register_dict): Delete; not
1354 needed anymore due to generic array/map marshalling.
1355 (dbus_g_value_types_init): Don't register basic arrays or the
1357 (dbus_gtype_from_signature_iter): Don't try to recurse into
1359 (dbus_gtype_to_signature): Check collection/map before type
1361 (demarshal_garray_basic): Renamed to demarshal_collection_array.
1362 (demarshal_ghashtable): Renamed to demarshal_map; fix to use new
1363 generic map creation/append functions instead of hash table
1365 (get_type_demarshaller): Handle maps.
1366 (demarshal_collection): Dispatch on collection type to either
1367 demarshal_collection_ptrarray or demarshal_collection_array.
1368 (get_type_marshaller): Handle maps.
1369 (marshal_collection): Dispatch collection type to either
1370 marshal_collection_ptrarray or marshal_collection_array.
1371 (_dbus_gvalue_test): New test.
1373 * glib/dbus-gvalue-utils.c (unset_and_free_g_value): New function.
1374 (hash_free_from_gtype): Use it to free GValues.
1375 (hashtable_append): New function.
1376 (ptrarray_append): Fix prototype.
1377 (slist_append): Ditto.
1378 (_dbus_gvalue_utils_test): Extend tests.
1380 * glib/dbus-gtype-specialized.c
1381 (dbus_g_type_specialized_init_append): Renamed from
1382 dbus_g_type_specialized_collection_init_append. Remove const from
1383 value, since we steal it.
1384 (dbus_g_type_specialized_map_append): New function.
1386 * glib/dbus-gtype-specialized.h: Update prototypes.
1387 Add DBusGTypeSpecializedMapAppendFunc.
1389 * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
1392 * glib/dbus-gtest.h: Prototype it.
1394 2005-07-08 Ross Burton <ross@openedhand.com>
1397 Add DBysGAsyncData for the async bindings.
1399 * glib/dbus-binding-tool-glib.c:
1400 Re-enable the async bindings.
1402 * test/glib/test-dbus-glib.c:
1403 Add a test for the generated async bindings.
1405 2005-07-08 Colin Walters <walters@verbum.org>
1407 * doc/TODO: Update GLib todo bits, also add a post-1.0 TODO for a
1410 2005-07-08 Colin Walters <walters@verbum.org>
1412 * tools/Makefile.am: Kill of print-introspect in favor of using
1413 dbus-send --print-reply=literal.
1415 * test/glib/test-service-glib.xml:
1416 * test/glib/test-service-glib.c (my_object_get_objs): New test
1419 * test/glib/test-dbus-glib.c (echo_received_cb): Free echo data.
1420 (main): Test GetObjs.
1422 * glib/examples/statemachine/Makefile.am:
1423 * glib/examples/statemachine/sm-marshal.list:
1424 * glib/examples/statemachine/statemachine-client.c:
1425 * glib/examples/statemachine/statemachine-server.c:
1426 * glib/examples/statemachine/statemachine-server.xml:
1427 * glib/examples/statemachine/statemachine.c:
1428 * glib/examples/statemachine/statemachine.h:
1429 * glib/examples/statemachine/statemachine.xml:
1433 * glib/examples/example-service.c (main): Move invocation
1434 of dbus_g_object_type_install_info earlier, to emphasize it
1435 should only be done once.
1437 * glib/examples/example-signal-emitter.c (main): Ditto.
1439 * glib/examples/Makefile.am (SUBDIRS): Include statemachine.
1441 * glib/dbus-gvalue.h (dbus_gtype_to_signature)
1442 (dbus_gvalue_marshal): Update prototypes.
1444 * glib/dbus-gvalue.c: Update all marshalling functions to take
1445 const GValue instead of GValue.
1446 (signature_iter_to_g_type_array): Return a GPtrArray for nonfixed
1448 (dbus_gvalue_to_signature): Update for dbus_gtype_to_signature
1450 (dbus_gtype_to_signature): Handle generic collecitons and maps.
1451 Return a newly-allocated string.
1452 (demarshal_proxy, demarshal_object_path, demarshal_object)
1453 (demarshal_strv, demarshal_ghashtable): Set error, don't assert if
1454 we get the wrong types from message.
1455 (get_type_demarshaller): New function, extracted from
1456 dbus_gvalue_demarshal.
1457 (demarshal_collection): New function, demarshals generic
1459 (dbus_gvalue_demarshal): Just invoke result of
1460 get_type_demarshaller. Throw error if we don't have one.
1461 (marshal_garray_basic): Abort on OOM.
1462 (get_type_marshaller): New function, extracted from
1463 dbus_gvalue_marshal.
1464 (collection_marshal_iterator, marshal_collection): New functions;
1465 implements generic marshalling for an iteratable specialized
1467 (dbus_gvalue_marshal): Just invoke result of get_type_marshaller.
1469 * glib/dbus-gvalue-utils.c (gvalue_from_ptrarray_value): Handle
1471 (ptrarray_value_from_gvalue): Ditto.
1472 (ptrarray_append, ptrarray_free): New functions.
1473 (slist_constructor, slist_iterator, slist_copy_elt, slist_copy)
1474 (slist_append, slist_end_append, slist_free): New functions.
1475 (dbus_g_type_specialized_builtins_init): Add append fuctions
1476 for GPtrArray and GSList. Register GSList.
1477 (test_specialized_hash, _dbus_gvalue_utils_test): New functions.
1479 * glib/dbus-gtype-specialized.h (DBusGTypeSpecializedAppendContext):
1481 (dbus_g_type_specialized_collection_init_append)
1482 (dbus_g_type_specialized_collection_append)
1483 (dbus_g_type_specialized_collection_end_append): Prototype.
1484 (DBusGTypeSpecializedCollectionVtable): Add append_func and
1487 * glib/dbus-gtype-specialized.c (dbus_g_type_specialized_collection_init_append)
1488 (dbus_g_type_specialized_collection_append)
1489 (dbus_g_type_specialized_collection_end_append): New functions.
1490 (dbus_g_type_map_value_iterate): Take const GValue.
1491 (dbus_g_type_collection_value_iterate): Ditto.
1493 * glib/dbus-gtest.c (dbus_glib_internal_do_not_use_run_tests): Run
1494 _dbus_gvalue_utils_test.
1496 * glib/dbus-gtest.h: Prototype it.
1498 * glib/dbus-gproxy.c (dbus_g_proxy_manager_filter): Avoid
1499 using uninitialized owner_list.
1500 (dbus_g_proxy_begin_call_internal): Move return_if_fail to
1502 (dbus_g_proxy_end_call_internal): Update to use error set
1503 from dbus_gvalue_demarshal instead of setting it here.
1504 (dbus_g_proxy_begin_call): Move return_if_fail here.
1506 * glib/dbus-gobject.c (write_interface): Update for
1507 dbus_gtype_to_signature returning new string.
1509 * configure.in: Add glib/examples/statemachine.
1511 2005-07-08 Joe Shaw <joeshaw@novell.com>
1513 * configure.in: Add a configure option, --with-console-auth-dir
1515 * dbus/dbus-sysdeps-util.c (_dbus_user_at_console): Use the
1516 new setting. Patch from Kay Sievers.
1518 2005-07-06 Colin Walters <walters@verbum.org>
1520 * dbus/dbus-glib.h (DBusGPendingCall, DBusGPendingCallNotify)
1521 (DBUS_TYPE_G_PENDING_CALL, dbus_g_pending_call_get_g_type)
1522 (dbus_g_pending_call_ref, dbus_g_pending_call_unref): Delete.
1523 (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel):
1524 Delete in favor of dbus_g_proxy_begin_call and
1525 dbus_g_proxy_cancel_call.
1526 (DBusGProxyCall, DBusGProxyCallNotify): New.
1527 (dbus_g_proxy_begin_call): Change prototype to take callback, user
1528 data, and destroy function. This replaces
1529 dbus_g_pending_call_set_notify.
1530 (dbus_g_proxy_cancel_call): Prototype.
1531 (DBusGAsyncData): Delete, shouldn't be needed anymore.
1533 * glib/dbus-gproxy.c (struct _DBusGProxy): Add call_id_counter and
1535 (struct _DBusGProxyManager): Add bus_proxy member, which is an
1536 internal proxy for calls to the bus. Remove
1537 pending_nameowner_calls, now the internal proxy keeps track.
1538 (dbus_g_proxy_manager_unref): Unref bus proxy, remove reference to
1539 pending_nameowner_calls.
1540 (got_name_owner_cb): Update prototype, and use
1541 dbus_g_proxy_end_call.
1542 (got_name_owner_cb): Remove reference to pending_nameowner_calls.
1543 (dbus_g_proxy_manager_register): Delete directly libdbus code in
1544 favor of using internal proxy.
1545 (dbus_g_proxy_manager_unregister): Update to use
1546 dbus_g_proxy_cancel_call for any pending GetNameOwner call.
1547 (dbus_g_proxy_init): Initialize pending calls map.
1548 (dbus_g_proxy_constructor): New.
1549 (dbus_g_proxy_class_init): Add get/set property functions,
1550 constructor, and add NAME, PATH, and INTERFACE properties.
1551 (cancel_pending_call): New function.
1552 (dbus_g_proxy_dispose): Iterate over any outstanding calls and
1554 (dbus_g_proxy_set_property, dbus_g_proxy_get_property): New.
1555 (GPendingNotifyClosure): New structure.
1556 (d_pending_call_notify, d_pending_call_free): Moved here from
1558 (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Moved around to satisfy function
1560 (manager_begin_bus_call): New internal function for talking to
1562 (dbus_g_proxy_new): Construct object using GObjet properties.
1563 (dbus_g_proxy_begin_call_internal): Update to take user data, etc.
1564 Create closure of same, and insert call into map of pending calls.
1565 (dbus_g_proxy_end_call_internal): Take call id instead of pending
1566 call. Look up pending call in current set. Remove it when we've
1568 (dbus_g_pending_call_end, dbus_g_proxy_end_call_internal): Delete.
1569 (dbus_g_proxy_begin_call): Change API to take callback, user data,
1570 and destroy function directly.
1571 (dbus_g_proxy_end_call): Update to take DBusGProxyCall.
1572 (dbus_g_proxy_call): Invoke with NULL callback.
1573 (dbus_g_proxy_cancel_call): New function, replaces
1574 dbus_g_pending_call_cancel.
1576 * glib/dbus-gparser.c (validate_signature): Fix call to
1579 * glib/dbus-gobject.c (dbus_g_object_type_dbus_metadata_quark):
1580 New quark for attaching metadata to GType.
1581 (info_hash): Delete.
1582 (lookup_object_info): Look up using quark.
1583 (dbus_g_object_type_install_info): Check that a type is classed,
1584 not that it's an object. Also just install type data using quark
1585 instead of using global hash.
1587 * glib/dbus-glib.c (dbus_g_pending_call_ref)
1588 (dbus_g_pending_call_unref, dbus_pending_call_get_g_type)
1589 (GPendingNotifyClosure): Delete.
1590 (d_pending_call_notify, d_pending_call_free): Move to dbus-gproxy.c.
1591 (dbus_g_pending_call_set_notify, dbus_g_pending_call_cancel): Delete.
1593 * glib/dbus-binding-tool-glib.c (generate_client_glue): Disable async
1594 client method generation until we can fix it...
1596 * tools/dbus-viewer.c (load_child_nodes): Use dbus_g_proxy_call.
1597 (load_from_service_thread_func): Ditto.
1599 * tools/dbus-names-model.c (struct NamesModel): Hold
1601 (have_names_notify): Update prototype, use
1602 dbus_g_proxy_cancel_call.
1603 (names_model_reload): Update for new dbus_g_proxy_begin_call API.
1605 * tools/dbus-monitor.c (filter_func): Update for print_message
1608 * test/glib/test-dbus-glib.c: Add more tests for async
1609 invocations. Update many begin_call/end_call pairs to just use
1612 * tools/dbus-send.c (main): Add --print-reply=literal mode. This
1613 allows us to dump print-introspect.c.
1615 * tools/dbus-print-message.h (print_message): Add literal argument
1616 to print_message which is intended to allow printing arguments without
1617 metadata like "string=".
1619 * tools/dbus-print-message.c (print_iter): Add literal argument.
1620 (print_message): Allow printing string messages literally.
1622 2005-07-05 Colin Walters <walters@verbum.org>
1624 * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
1625 Remove value refcount leak, original patch from Jorn Baayen
1626 <jorn@openedhand.com>. Also remove useless extra value in favor
1627 of prepending to value array directly.
1629 2005-07-02 Colin Walters <walters@verbum.org>
1631 * glib/dbus-gmain.c (_dbus_gmain_test): Fix test.
1633 2005-07-01 Colin Walters <walters@verbum.org>
1635 Patch from Jonathan Matthew <jonathan@kaolin.hn.org>
1637 * glib/dbus-gvalue.c (basic_typecode_to_gtype): Fix return type.
1638 (dbus_g_value_types_init): Marshal G_TYPE_CHAR as DBUS_TYPE_BYTE,
1639 G_TYPE_LONG as DBUS_TYPE_INT32, G_TYPE_ULONG as DBUS_TYPE_UINT32,
1640 and G_TYPE_FLOAT as DBUS_TYPE_DOUBLE.
1642 2005-06-30 Colin Walters <walters@verbum.org>
1644 * test/glib/test-dbus-glib.c:
1645 * test/glib/test-service-glib.c:
1646 * test/glib/test-service-glib.xml: Update tests for new error
1647 setting bits, also add async tests (patch from Ross Burton).
1649 * test/glib/Makefile.am (test_service_glib_LDADD): Add
1650 DBUS_GLIB_THREADS_LIBS.
1652 * glib/dbus-gproxy.c (get_name_owner)
1653 (dbus_g_pending_call_end_valist): Ditto.
1655 * glib/dbus-gobject.c (error_metadata): New mapping from GError
1656 domain (GQuark) to DBusGErrorInfo.
1657 (gerror_domaincode_to_dbus_error_name): Attempt to look up error
1658 quark in error_metadata. Take message interface as default
1659 error message interface.
1660 (gerror_to_dbus_error_message): Pass message interface.
1661 (dbus_set_g_error): Resurrected.
1662 (dbus_g_error_info_free): New function.
1663 (dbus_g_object_type_install_info): Use g_type_class_ref instead
1664 of _peek to actually create the object class if it hasn't been
1666 (dbus_g_error_domain_register): New function.
1668 * glib/dbus-gmain.c (dbus_g_bus_get): Switch to dbus_set_g_error.
1670 * glib/dbus-gparser.c (validate_signature): Ditto.
1672 * dbus/dbus-glib.h (dbus_g_error_set): Delete.
1673 (dbus_g_error_domain_register): Prototype.
1675 * glib/dbus-glib.c (dbus_g_error_set): Delete.
1678 2005-06-29 Colin Walters <walters@verbum.org>
1680 * dbus/dbus-glib.h: Delete DBUS_TYPE_G_PROXY_ARRAY. Add
1681 DBUS_TYPE_G_OBJECT_PATH.
1683 * glib/dbus-gvalue.c (dbus_g_value_types_init): Remove marshallers
1684 for G_TYPE_OBJECT and DBUS_TYPE_G_PROXY_ARRAY (the latter should
1685 be handled more generically). Add DBUS_TYPE_G_OBJECT_PATH.
1686 (dbus_g_object_path_get_g_type): New function.
1687 (dbus_gtype_from_signature_iter): Map DBUS_TYPE_OBJECT_PATH
1688 to DBUS_TYPE_G_OBJECT_PATH by default.
1689 (demarshal_proxy): Remove unused name variable.
1690 (demarshal_object_path, marshal_object_path): New functions.
1691 (demarshal_proxy_array, marshal_proxy_array): Delete.
1693 * glib/dbus-binding-tool-glib.c (dbus_g_type_get_c_name): Map
1694 DBUS_TYPE_G_OBJECT_PATH to char *.
1695 (dbus_g_type_get_lookup_function): Map builtin
1696 DBUS_TYPE_G_OBJECT_PATH.
1698 * test/glib/test-dbus-glib.c
1699 * test/glib/test-service-glib.c (my_object_objpath):
1700 Adapt tests to new object path marshalling.
1702 2005-06-29 John (J5) Palmieri <johnp@redhat.com>
1704 * configure.in: force check for Python >= 2.4
1706 2005-06-29 Colin Walters <walters@verbum.org>
1708 Patch from Ross Burton <ross@openedhand.com>
1710 * glib/dbus-gobject.c (invoke_object_method): Unset object
1711 value in all cases, not only in async case.
1713 2005-06-29 Colin Walters <walters@verbum.org>
1715 * glib/dbus-gproxy.c (struct _DBusGProxy): Add new member
1716 name_call for keeping track of any outgoing GetNameOwner call.
1717 Also add for_owner and associated.
1718 (struct _DBusGProxyManager): Add owner_names, which is hash table
1719 that maps a base name to a list of names it owns (that we're
1720 interested in). Add pending_nameowner_calls which is a list of
1721 all outstanding GetNameOwner; avoids us having to iterate over
1722 every proxy. Add unassociated_proxies which keeps track of name
1723 proxies with no associated name owner.
1724 (dbus_g_proxy_manager_unref): Destroy owner_names.
1725 (struct DBusGProxyNameOwnerInfo): New struct for keeping track of
1727 (find_name_in_info, name_owner_foreach)
1728 (dbus_g_proxy_manager_lookup_name_owner, insert_nameinfo)
1729 (dbus_g_proxy_manager_monitor_name_owner)
1730 (dbus_g_proxy_manager_unmonitor_name_owner)
1731 (unassociate_proxies, dbus_g_proxy_manager_replace_name_owner):
1732 New functions; they manipulate the owner_names mapping.
1733 (got_name_owner_cb): New function.
1734 (get_name_owner): New function, extracted from
1735 dbus_g_proxy_new_for_name_owner.
1736 (dbus_g_proxy_manager_register): For now we need to keep track of
1737 all NameOwnerChanged. Also if the proxy is for a name, if we
1738 don't already know the name owner, queue a new GetNameOwner
1739 request and add it to our list of unassociated proxies. Otherwise
1741 (dbus_g_proxy_manager_unregister): If this proxy is for a name,
1742 cancel any pending GetNameOwner call, etc.
1743 (dbus_g_proxy_manager_filter): Handle NameOwnerChanged. Also use
1744 the owner_names mapping to look up the current names for the
1745 signal source, and dispatch to any proxies for that name.
1746 (dbus_g_proxy_new): Initialize new members.
1747 (dbus_g_proxy_new_for_name): Delete unused proxy variable.
1748 (dbus_g_proxy_new_for_name_owner): Use get_name_owner.
1749 (dbus_g_pending_call_end_valist): New function, extracted from
1750 dbus_g_proxy_end_call_internal. Useful when we don't have a proxy
1751 but want to use the GLib infrastructure. Also note how many
1752 arguments in reply were over.
1753 (dbus_g_pending_call_end): New function, just call
1754 dbus_g_pending_call_end_valist.
1755 (dbus_g_proxy_end_call_internal): Just call
1756 dbus_g_pending_call_end_valist.
1758 * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Fix lookup
1759 of builtin marshaller for STRING_STRING_STRING.
1761 * test/glib/test-dbus-glib.c:
1762 * test/glib/test-service-glib.c:
1763 * test/glib/test-service-glib.xml:
1764 Extend tests to cover name proxies, destruction of owner proxies,
1767 * glib/examples/example-signal-recipient.c
1768 (dbus_g_proxy_new_for_name_owner): Create a name proxy.
1770 * tools/dbus-send.c (main): Print D-BUS error name in addition
1773 2005-06-28 John (J5) Palmieri <johnp@redhat.com>
1775 * python/dbus_bindings.pyx.in (cunregister_function_handler,
1776 cmessage_function_handler): Patch from
1777 Anthony Baxter <anthony@interlink.com.au> fixes threading problems
1778 by using the Py_GILState_Ensure/Release to synchronize with the
1781 2005-06-28 Ray Strode <rstrode@redhat.com>
1783 * dbus/dbus-spawn.c (_dbus_babysitter_unref): kill
1784 babysitter helper process on last unref, bug #2813.
1786 2005-06-27 Colin Walters <walters@verbum.org>
1788 * test/glib/test-dbus-glib.c:
1789 * test/glib/test-service-glib.c:
1790 * test/glib/test-service-glib.xml:
1791 Test hash table signal emitting.
1793 * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller): Convert
1794 types to their fundamental basis types, since this is what
1795 marshallers operate on. Also add an entry for VOID__BOXED.
1796 (dbus_g_object_register_marshaller_array): Convert to fundamental.
1798 2005-06-26 Havoc Pennington <hp@redhat.com>
1800 * doc/dbus-tutorial.xml: fix names of interface/service/path, fix
1803 2005-06-26 Colin Walters <walters@verbum.org>
1805 * glib/dbus-glib.c (dbus_set_g_error): Delete.
1806 (dbus_g_error_set): New public function from its ashes; used by
1807 both service-side method implementation and GLib bindings
1809 (dbus_g_error_has_name, dbus_g_error_get_name): New function.
1810 (_dbus_glib_test): Add some tests.
1812 * test/glib/test-dbus-glib.c (main): Test dbus_g_error_has_name.
1814 * test/glib/test-service-glib.c (my_object_throw_error): Use
1817 * glib/dbus-gobject.c (gerror_to_dbus_error_message): Handle
1818 errors thrown by dbus_g_error_set.
1820 * glib/dbus-gmain.c (dbus_g_bus_get): Change to dbus_g_error_set.
1822 * glib/dbus-gparser.c (validate_signature): Ditto.
1824 * glib/dbus-gproxy.c (dbus_g_proxy_new_for_name_owner)
1825 (dbus_g_proxy_end_call_internal): Ditto.
1827 * glib/Makefile.am: Generate dbus-glib-error-switch.h, which
1828 converts DBUS_ERROR_x to DBUS_GERROR_x.
1829 (libdbus_glib_1_la_SOURCES, BUILT_SOURCES, CLEANFILES): Add it.
1831 * doc/TODO: Remove error TODO.
1833 * doc/dbus-tutorial.xml: Update with documentation about error
1836 * dbus/make-dbus-glib-error-enum.sh: Tighten up regexp to make
1837 sure we only change DBUS_ERROR to DBUS_GERROR, not all ERROR to
1838 GERROR. Also add DBUS_GERROR_REMOTE_EXCEPTION.
1840 2005-06-22 Colin Walters <walters@verbum.org>
1842 Patch from Ross Burton <ross@openedhand.com>
1844 * glib/dbus-gobject.c (dbus_g_method_return): Free out_sig.
1846 2005-06-20 Colin Walters <walters@verbum.org>
1848 * configure.in: Add glib/examples.
1850 * glib/Makefile.am: Add examples/
1852 * glib/examples/.cvsignore
1853 * glib/examples/Makefile.am
1854 * glib/examples/example-client.c
1855 * glib/examples/example-service.c
1856 * glib/examples/example-service.xml
1857 * glib/examples/example-signal-emitter.c
1858 * glib/examples/example-signal-emitter.xml
1859 * glib/examples/example-signal-recipient.c:
1860 New files; GLib binding examples, ported from
1863 2005-06-20 Colin Walters <walters@verbum.org>
1866 * glib/dbus-gproxy.c: Rename dbus_g_proxy_invoke to
1869 * glib/dbus-binding-tool-glib.c:
1870 * doc/dbus-tutorial.xml:
1871 * test/glib/test-dbus-glib.c: Update for rename.
1873 2005-06-20 Colin Walters <walters@verbum.org>
1875 Patch suggested by Ross Burton <ross@openedhand.com>
1877 * glib/dbus-gobject.c (export_signals): Free signal name.
1878 (g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
1879 memory leak. Add a bit of documentation.
1880 (dbus_g_method_return_error): Free context, and note we do
1883 2005-06-18 Murray Cumming <murrayc@murrayc.com>
1886 * glib/dbus-gobject.c:
1887 * glib/dbus-gproxy.c:
1888 * glib/dbus-gvalue.c: Predeclare structs as
1889 typedef struct _Something Something instead of
1890 typedef struct Something Something, so we can
1891 redeclare the prototypes. Other GNOME libraries
1894 2005-06-17 Colin Walters <walters@verbum.org>
1896 * tools/dbus-names-model.c (have_names_notify): Fix call
1897 to dbus_g_proxy_end_call.
1899 2005-06-17 Colin Walters <walters@verbum.org>
1901 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
1902 spew warnings if we get malformed remote signals.
1904 * glib/dbus-gobject.c (propsig_iterate): New function.
1905 (lookup_object_info): New function, extracted from
1906 lookup_object_and_method.
1907 (introspect_properties, introspect_signals): Delete; these
1908 are merged into write_interface.
1909 (write_interface): Write out signals and properties here;
1910 dump the org.gtk.object stuff and use the interface given
1911 in the introspection data blob. Also fix up property XML.
1912 (lookup_values): New function.
1913 (introspect_interfaces): Gather a mapping from interface to a
1914 list of its methods, signals, and properties, then write out
1916 (lookup_object_and_method): Use lookup_object_info.
1917 (struct DBusGSignalClosure): Add interface.
1918 (dbus_g_signal_closure_new): Add interface. Don't dup signame;
1919 we can just use the constant data.
1920 (dbus_g_signal_closure_finalize): Don't free signal name.
1921 (signal_emitter_marshaller): Use interface from signal closure.
1922 (export_signals): Only export signals mentioned in introspection
1924 (dbus_g_connection_register_g_object): Warn if we have no
1925 introspection data for an object.
1926 (funcsig_equal): Remove unused variable.
1927 (dbus_g_object_register_marshaller): Take varargs instead of
1929 (dbus_g_object_register_marshaller_array): New function,
1930 extracted from old dbus_g_object_register_marshaller.
1932 * glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
1933 signals and property data.
1934 (write_quoted_string): New function, extracted from generate_glue.
1935 (generate_glue): Write signals and properties to introspection
1938 * dbus/dbus-glib.h (struct DBusGObjectInfo): Include
1939 exported_signals and exported_properties.
1940 (dbus_g_object_register_marshaller): Update prototype.
1941 (dbus_g_object_register_marshaller_array): Prototype.
1943 * test/glib/test-dbus-glib.c: Extend testing to cover new signals.
1945 * test/glib/test-service-glib.c: Add new test signals and method
1948 * test/glib/test-service-glib.xml: Add some test signals.
1950 * test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
1951 and my-object-marshal.h
1952 (test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
1953 my-object-marshal.c.
1954 (my-object-marshal.c, my-object-marshal.h): Implement.
1956 * test/glib/.cvsignore: Update.
1958 * doc/TODO: Remove two GLib TODO items fixed by this
1961 2005-06-16 Colin Walters <walters@verbum.org>
1963 * doc/TODO: Update for GLib bindings.
1965 2005-06-16 Colin Walters <walters@verbum.org>
1967 * glib/dbus-binding-tool-glib.c:
1968 * glib/dbus-gobject.c:
1969 * glib/dbus-gproxy.c: Add Nokia copyright; Patch
1970 from Ross Burton, for his GLib bindings work.
1972 2005-06-16 Colin Walters <walters@verbum.org>
1974 * glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
1975 to iterate instead of walking to G_TYPE_INVALID.
1977 Patch based on a patch from Ryan Gammon.
1979 2005-06-16 Colin Walters <walters@verbum.org>
1981 * bus/bus.c (bus_context_new): Set parser to NULL
1982 after we unref it (Patch from Chris Boscolo, #2174).
1984 2005-06-16 Colin Walters <walters@verbum.org>
1986 * python/dbus_bindings.pyx.in: Import size_t,
1987 __int64_t, __uint64_t, and __signed.
1989 * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (write_credentials_byte):
1990 Define cmsg struct, output it.
1991 (_dbus_read_credentials_unix_socket):
1994 Patch from Joe Markus Clarke for FreeBSD support.
1996 2005-06-16 Colin Walters <walters@verbum.org>
1998 * tools/dbus-send.c (append_array): Use strtok.
1999 (append_dict): New function.
2000 (type_from_name): New function, extracted from main.
2001 (main): Handle sending dicts.
2003 * tools/dbus-print-message.c (print_iter): Print dict
2006 2005-06-16 Colin Walters <walters@verbum.org>
2008 * glib/dbus-gvalue.c (marshal_basic): Marshal NULL string
2009 values as the empty string (#2948).
2011 2005-06-16 Colin Walters <walters@verbum.org>
2014 * mono/doc/Makefile.am:
2015 * test/glib/Makefile.am:
2017 Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
2019 2005-06-16 Colin Walters <walters@verbum.org>
2021 * dbus/dbus-marshal-header.c (_dbus_header_load): Set
2022 header byte order from expected byte order (Patch from Chris Wilson, #3475).
2024 * dbus/dbus-marshal-byteswap.c (byteswap_body_helper):
2025 Increment pointer after swapping fixed array. Add assertion
2028 2005-06-15 Colin Walters <walters@verbum.org>
2030 * dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (_dbus_read_credentials_unix_socket):
2031 Fix call to dbus_set_error. (Patch from Michael Banck, #3461)
2033 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
2035 * NEWS: Update to 0.34
2037 2005-06-15 David Zeuthen <davidz@redhat.com>
2039 * configure.in (LT_CURRENT): Revert back to 1 as the library
2040 hasn't changed and we've certainly not committed to protocol
2041 stability yet. All this does is to break ABI. See commit note
2042 from hp@redhat.com 2005-05-05 for details.
2044 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
2046 * dbus/dbus-connection.c (_dbus_connection_peer_filter): New method
2047 (_dbus_connection_run_builtin_filters): New method
2048 (dbus_connection_dispatch): Run the builtin filters which in turn
2049 runs the peer filter which handles Ping messages.
2052 - Ping isn't handled: This patch fixes it
2054 - Add a test case for the Ping message: added TODO item
2056 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
2058 * dbus/dbus-message.c:
2059 (dbus_message_has_path): New method
2060 (dbus_message_has_interface): New method
2061 (dbus_message_has_member): New method
2063 * dbus/dbus/dbus-sysdeps.c (_dbus_check_dir_is_private_to_user):
2066 * dbus/dbus-keyring.c (_dbus_keyring_reload): Check to see that
2067 the keyring directory is private to the user
2070 - The convenience functions in dbus-bus.h should perhaps have
2071 the signatures that they would have if they were autogenerated
2072 stubs. e.g. the acquire service function. We should also evaluate
2073 which of these functions to include, in light of the fact that
2074 GLib/Qt native stubs will probably also exist.: Punted
2076 - add dbus_message_has_path(), maybe has_member/interface:
2079 - in dbus-keyring.c, enforce that the keyring dir is not
2080 world readable/writable: Fixed in this patch
2082 2005-06-15 John (J5) Palmieri <johnp@redhat.com>
2084 * dbus/dbus-marshal-validate.h: Added a new validation
2085 error code DBUS_VALIDITY_UNKNOWN_OOM_ERROR = -4 for
2086 out of memory errors when validating signitures
2088 * dbus/dbus-marshal-header.c: use DBUS_VALIDITY_UNKNOWN_OOM_ERROR
2089 in places where we previously used DBUS_VALID and a FALSE return
2090 value to indicate OOM
2092 * dbus/dbus-marshal-validate.c (_dbus_validate_signature_with_reason):
2093 Use a stack to track the number of elements inside containers. The
2094 stack values are then used to validate that dict entries have only two
2095 elements within them.
2096 (validate_body_helper): check the reason for failure when validating
2099 * dbus/dbus-message.c (load_message): use
2100 DBUS_VALIDITY_UNKNOWN_OOM_ERROR in places where we previously used
2101 DBUS_VALID and a FALSE return value to indicate OOM
2103 * doc/TODO: remove "- validate dict entry number of fields" as this
2106 2005-06-14 David Zeuthen <davidz@redhat.com>
2108 * bus/bus.c (process_config_every_time): Drop existing conf-dir
2109 watches (if applicable) and add new watches
2111 * bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
2112 (main): Setup SIGIO signal handler if using D_NOTIFY
2114 * bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs
2116 * bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
2117 (merge_included): Also merge conf_dirs list
2118 (bus_config_parser_unref): Clear conf_dirs list
2119 (include_dir): Add directory to conf_dirs list
2120 (bus_config_parser_get_conf_dirs): New function
2122 * bus/dir-watch.[ch]: New files
2124 * bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]
2126 * configure.in: Add checks for D_NOTIFY on Linux
2128 2005-06-14 Colin Walters <walters@verbum.org>
2130 * glib/dbus-binding-tool-glib.c:
2131 * glib/dbus-gobject.c:
2132 * glib/dbus-gvalue.c: Fix indentation and brace style.
2134 2005-06-14 Ross Burton <ross@openedhand.com>.
2136 * glib/dbus-glib.h: Make DBusGMethodInvocation
2137 a private structure. Rearrange prototypes a bit.
2139 * glib/dbus-gproxy.c (dbus_g_proxy_invoke): Add
2140 documentation for first_arg_type.
2142 * glib/dbus-gobject.c: Move DBusGMethodInvocation
2143 here, add documentation. Move dbus_g_method_return
2144 and dbus_g_method_return_error into public API
2147 2005-06-14 Colin Walters <walters@verbum.org>
2149 * glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller):
2150 Add missing return statements, noticed by Ross Burton.
2152 2005-06-13 Ross Burton <ross@openedhand.com>.
2154 * glib/dbus-gobject.c: Handle errors on message
2155 demarshalling by sending error message back.
2156 * glib/dbus-gvalue.c: Initialize return variables.
2158 2005-06-13 Colin Walters <walters@verbum.org>
2160 * glib/Makefile.am: Fix thinko in last patch.
2162 2005-06-13 Colin Walters <walters@verbum.org>
2164 * glib/Makefile.am: Move dbus-gtype-specialized.c
2165 and dbus-gtype-specialized.h into a _HEADERS variable,
2168 2005-06-12 Colin Walters <walters@verbum.org>
2170 Async signals and various bugfixes and testing by
2171 Ross Burton <ross@openedhand.com>.
2173 * glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
2174 (dbus_gvalue_genmarshal_name_from_type)
2175 (dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
2176 (dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
2177 (dbus_g_value_types_init, dbus_gtype_from_signature)
2178 (dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
2179 (dbus_gtypes_from_arg_signature): New function prototypes.
2180 (dbus_gvalue_demarshal): Take context and error arguments.
2181 (dbus_gvalue_demarshal_variant): New function.
2182 (dbus_gvalue_demarshal_message): New function.
2183 (dbus_gvalue_store): Delete.
2185 * glib/dbus-gvalue.c:
2187 File has been almost entirely rewritten; now we special-case
2188 more types such as DBUS_TYPE_SIGNATURE, handle arrays and
2189 hash tables correctly, etc. Full support for recursive values
2190 is not yet complete.
2192 * glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
2193 argument of signal to G_TYPE_POINTER since we now pass a
2195 (lookup_g_marshaller): Delete in favor of
2196 _dbus_gobject_lookup_marshaller.
2197 (marshal_dbus_message_to_g_marshaller): Use
2198 _dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
2199 to handle remote signal callbacks.
2200 (dbus_g_proxy_new_from_proxy): New function; creates a new
2201 DBusGProxy by copying an existing one.
2202 (dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
2203 (dbus_g_proxy_get_path): New functions.
2204 (dbus_g_proxy_marshal_args_to_message): New function;
2205 factored out of existing code.
2206 (DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
2207 from a varargs array.
2208 (dbus_g_proxy_begin_call_internal): New function.
2209 (dbus_g_proxy_end_call_internal): New function.
2210 (dbus_g_proxy_begin_call): Take GTypes instead of DBus types
2211 as arguments; simply invoke dbus_g_proxy_begin_call_internal
2212 after collecting args into value array.
2213 (dbus_g_proxy_end_call): Take GTypes instead of DBus types;
2214 invoke dbus_g_proxy_end_call_internal.
2215 (dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
2217 (dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
2219 (array_free_all): New function.
2220 (dbus_g_proxy_add_signal): Take GTypes.
2222 * glib/dbus-gobject.h:
2223 (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
2224 (_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
2227 * glib/dbus-gobject.c: Add a global marshal_table hash which
2228 stores mappings from type signatures to marshallers. Change lots
2229 of invocations of dbus_gtype_to_dbus_type to
2230 dbus_gtype_to_signature.
2231 (_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
2232 (introspect_signals): Fix test for query.return_type.
2233 (set_object_property): Update invocation of dbus_gvalue_demarshal.
2234 (invoke_object_method): Many changes. Handle asynchronous
2235 invocations. Convert arguments with
2236 dbus_gvalue_demarshal_message. Handle errors. Use
2237 DBusSignatureIter instead of strlen on args. Handle all arguments
2238 generically. Special-case variants.
2239 (dbus_g_method_return, dbus_g_method_return_error): New function.
2240 (DBusGSignalClosure): New structure, closes over signal
2242 (dbus_g_signal_closure_new): New function.
2243 (dbus_g_signal_closure_finalize): New function.
2244 (signal_emitter_marshaller): New function; is special marshaller
2245 which emits signals on bus.
2246 (export_signals): New function; introspects object signals and
2248 (dbus_g_object_type_install_info): Take GType instead of
2250 (dbus_g_connection_register_g_object): Invoke export_signals.
2251 (dbus_g_connection_lookup_g_object): New function.
2252 (DBusGFuncSignature) New structure; used for mapping type
2253 signatures to marshallers.
2254 (funcsig_hash): New function; hashes DBusGFuncSignature.
2255 (funcsig_equal): New function; compares DBusGFuncSignature.
2256 (_dbus_gobject_lookup_marshaller): New function.
2257 (dbus_g_object_register_marshaller): New function; used to
2258 register a marshaller at runtime for a particular signature.
2260 * glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.
2262 * glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
2263 which notes a server method implementation should be
2266 * glib/dbus-binding-tool-glib.c
2267 (dbus_binding_tool_output_glib_server): Call
2268 dbus_g_value_types_init.
2269 (write_formal_parameters): Use dbus_gtype_from_signature. Handle
2271 (dbus_g_type_get_lookup_function): Turn GType into an invocation
2272 of a lookup function.
2273 (write_args_for_direction): Use dbus_g_type_get_lookup_function.
2274 (write_untyped_out_args): New method; write output arguments.
2275 (write_formal_declarations_for_direction): Function for
2277 (write_formal_parameters_for_direction): Function for
2278 writing implementations.
2279 (write_typed_args_for_direction): Function for writing
2280 arguments prefixed with GTypes.
2281 (write_async_method_client): Write out async version
2284 * glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
2285 (dbus_g_type_get_marshal_name): Move mapping from GType
2286 to marshal name into here.
2287 (dbus_g_type_get_c_name): Move into here.
2288 (compute_marshaller): Convert signature to type with
2289 dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
2290 (compute_marshaller_name): Ditto.
2291 (compute_marshaller): Handle async signal annotations.
2292 (gather_marshallers): Return if we don't have a known
2294 (generate_glue): Collect introspection blob here, and
2295 write all of the blob at the end. This allows an object
2296 with multiple interfaces to work.
2297 Mark async methods in introspection blob.
2299 * glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
2300 dbus-gtype-specialized.c, dbus-gtype-specialized.h,
2301 dbus-gvalue-utils.h, dbus-gvalue-utils.c.
2303 * dbus/dbus-glib.h: Don't include dbus-protocol.h; this
2304 avoids people accidentally using DBUS_TYPE_* which should
2305 not be necessary anymore.
2306 Do include dbus-gtype-specialized.h, which are utilities
2307 for GLib container types.
2308 Add various #defines for types such as
2309 DBUS_TYPE_G_BOOLEAN_ARRAY.
2310 (DBusGValueIterator, DBusGValue): Define, not fully used
2312 (dbus_g_value_get_g_type): Type for recursive value.
2313 (dbus_g_value_open, dbus_g_value_iterator_get_value)
2314 (dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
2315 (dbus_g_value_free): Prototypes.
2316 (dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
2317 (dbus_g_proxy_set_interface): Prototype.
2318 (dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
2319 (dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
2321 (dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
2323 (DBusGAsyncData, DBusGMethodInvocation): Structures for
2324 doing async invocations.
2325 (dbus_g_method_return, dbus_g_method_return_error):
2327 * doc/dbus-tutorial.xml: Update GLib section.
2329 * tools/dbus-viewer.c (load_child_nodes): Update
2330 for new invocation type of dbus_g_proxy_end_call.
2331 (load_from_service_thread_func): Ditto.
2333 * tools/print-introspect.c (main): Ditto.
2335 * tools/dbus-names-model.c (have_names_notify)
2336 (names_model_reload, names_model_set_connection)
2339 * python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
2340 needed since Python bindings use GLib bindings.
2342 * test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
2343 Add --prefix argument.
2345 * tools/Makefile.am: Define DBUS_COMPILATION. Remove
2346 unneeded --ignore-unsupported arg.
2348 * test/glib/test-service-glib.c:
2349 * test/glib/test-service-glib.xml:
2350 * test/glib/test-dbus-glib.c: Add many more tests.
2352 2005-06-06 David Zeuthen <davidz@redhat.com>
2354 * doc/TODO: Add item about need to remove deprecated functions.
2356 * dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect
2358 * dbus/dbus-connection.c (dbus_connection_disconnect): New function
2359 to repair the ABI which was broken with the last commit.
2361 2005-06-02 John (J5) Palmieri <johnp@redhat.com>
2363 * dbus/dbus-connection.c, dbus/dbus-connection.h
2364 (dbus_connection_disconnect): renamed to dbus_connection_close
2365 for API symmetry with dbus_connection_open
2366 (_dbus_connection_open_internal):
2367 s/dbus_connection_disconnect/dbus_connection_close
2369 * dbus/dbus-bus.c (dbus_bus_get):
2370 s/dbus_connection_disconnect/dbus_connection_close
2372 * bus/connection.c (bus_connections_unref,
2373 bus_connections_setup_connection, bus_connections_expire_incomplete):
2374 s/dbus_connection_disconnect/dbus_connection_close
2376 * bus/dispatch.c (bus_dispatch, kill_client_connection,
2377 kill_client_connection_unchecked, check_hello_connection):
2378 s/dbus_connection_disconnect/dbus_connection_close
2380 * bus/bus.c (new_connection_callback):
2381 s/dbus_connection_disconnect/dbus_connection_close
2383 * tools/dbus-send.c (main):
2384 s/dbus_connection_disconnect/dbus_connection_close
2386 * test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
2387 s/dbus_connection_disconnect/dbus_connection_close
2389 * test/test-service.c (path_message_func, filter_func):
2390 s/dbus_connection_disconnect/dbus_connection_close
2392 * doc/TODO: remove connection_open/connection_disconnect lacks symmetry item that was just fixed
2394 2005-05-25 Colin Walters <walters@verbum.org>
2396 * dbus/dbus-protocol.h: Move various bus service #defines such
2397 as DBUS_SERVICE_DBUS and DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT to
2399 * dbus/dbus-shared.h: Various defines moved here.
2400 * dbus/dbus-marshal-header.c: Include dbus-shared.h.
2402 2005-05-25 John (J5) Palmieri <johnp@redhat.com>
2404 * python/__init__.py: Python bindings deserve a minor version
2405 update. Upped to (0, 40, 2)
2407 2005-05-24 John (J5) Palmieri <johnp@redhat.com>
2409 * python/decorators.py: add explicitly_pass_message decorator
2410 for passing in the dbus message as keyword for edge case signal
2413 * python/matchrules.py (SignalMatchRule.__repr__): fix output
2414 to conform with what dbus expects for match rules
2415 (SignalMatchRule.execute): add the dbus message as a keyword
2416 if the signal handler has requested it
2418 * python/examples/example/signal-recipient.py: added some more
2419 examples on how to hook up to signals
2421 2005-05-23 John (J5) Palmieri <johnp@redhat.com>
2423 * python/decorators.py: import dbus_bindings
2425 * python/matchrules.py (SignalMatchRule, SignalMatchTree,
2426 SignalMatchNode): new classes that implement wildcard signal
2427 callback matching using a tree lookup. Heavily modified from a
2428 patch sent by Celso Pinto (fd.o bug #3241)
2430 * _dbus.py (add_signal_receiver, remove_signal_receiver, _signal_func):
2431 use new match classes to handle signals.
2433 2005-05-19 John (J5) Palmieri <johnp@redhat.com>
2435 * python/dbus_bindings.pyx.in: s/TYPE_PATH/TYPE_OBJECT_PATH
2437 2005-05-18 Havoc Pennington <hp@redhat.com>
2439 * configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
2440 gettext. Not really worth requiring yet perhaps, but any
2441 production quality 1.0 would require it so we should go ahead and
2442 get things set up. We do have a couple token calls to
2443 bindtextdomain in the code already.
2445 2005-05-16 John (J5) Palmieri <johnp@redhat.com>
2447 * glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
2448 when using recursive g_main_loops
2450 * python/_dbus.py (class Bus): add the ProxyObjectClass
2451 alias for ProxyObject to make it easier for the Twisted
2452 networking framework to integrate dbus.
2454 * python/proxies.py (class ProxyObject): add the ProxyMethodClass
2455 alias for ProxyMethod to make it easier for the Twisted
2456 networking framework to integrate dbus.
2458 2005-05-11 Ross Burton <ross@openedhand.com>
2460 * glib/dbus-glib-tool.c: Add --prefix argument.
2461 * glib/dbus-binding-tool-glib.h: Add prefix argument.
2462 * glib/dbus-binding-tool-glib.c (compute_marshaller_name):
2463 Add prefix argument.
2464 (generate_glue): Pass prefix argument down.
2465 (dbus_binding_tool_output_glib_server): Pass prefix to
2468 2005-05-11 Colin Walters <walters@verbum.org>
2470 * tools/dbus-send.c (append_array): New function.
2471 (append_arg): Broken out from main.
2472 (main): Add cheesy hack to send arrays and variants.
2474 * tools/dbus-print-message.c (print_iter): Broken out
2477 2005-05-11 Colin Walters <walters@verbum.org>
2479 * dbus/dbus-signature.c (dbus_signature_iter_get_signature):
2480 New function, returns signature string for signature iter.
2481 * dbus/dbus-signature.h: Prototype it.
2482 * dbus/dbus-message.c (dbus_message_iter_get_signature):
2483 New function, returns signature string for message iter.
2484 (dbus_message_iter_get_array_len): New function, returns
2486 (dbus_message_iter_get_fixed_array): Fix assertion; this
2487 function should be used when the iter is pointing to the
2488 contents of an array
2489 * dbus/dbus-message.h: Prototypes.
2490 * dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
2491 New function; returns length of an array.
2492 * dbus/dbus-marshal-recursive.h: Prototype it.
2494 2005-05-11 Colin Walters <walters@verbum.org>
2496 * dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
2499 2005-05-08 Havoc Pennington <hp@redhat.com>
2501 * dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
2502 daemon's pid, not the parent's pid, to the file descriptor.
2503 Reported by Taj Morton.
2505 2005-05-05 Havoc Pennington <hp@redhat.com>
2507 * configure.in (LT_*): add notes on how the libtool versioning
2508 works to save thinking. Increment soname to indicate protocol
2509 breakage (though really the library interface hasn't changed I
2512 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
2513 verify the GUID received from server matches what we were
2514 expecting, if we had an expectation
2516 * dbus/dbus-auth.c (send_ok): send GUID along with the OK command
2517 (_dbus_auth_get_guid_from_server): new function
2518 (send_begin): parse the OK args
2520 * doc/dbus-specification.xml: add GUID to the auth protocol
2522 2005-05-05 John (J5) Palmieri <johnp@redhat.com>
2524 * Fix my name in previous changelog ;)
2526 * python/proxies.py (ProxyObject.__getattr__): add further patch
2527 from Anthony Baxter to throw an AttributeError when python
2528 __special__ functions are called instead of marshling them over
2529 the bus (Bug#1685 comment 3).
2531 2005-05-04 John (J5) Palmieri <johnp@redhat.com>
2533 * python/Makefile.am: changed to use pyexecdir for the binding
2534 shared libraries (Bug#2494)
2536 * python/exceptions.py: bring exceptions over from the bindings
2537 so they can be used in applications (Bug#2036)
2538 Make all exceptions derive from DBusException
2540 * python/_dbus.py, python/proxies.py: implement __repr__ in a couple
2541 of classes so that print obj doesn't throw an exception (Bug #1685)
2543 2005-05-03 Ross Burton <ross@openedhand.com>
2545 * glib/dbus-gobject.c (dbus_g_connection_register_g_object):
2546 Return if we get an error during registration. Set up a
2547 weak reference on object to unregister if object is destroyed.
2548 (unregister_gobject): New function.
2550 2005-05-01 John (J5) Palmieri <johnp@redhat.com>
2552 * python/dbus_bindings.pyx.in:
2553 - added new type classes for hinting to the marashaler what type
2554 to send over the wire
2555 - added int16 and uint16 marshalers
2556 - Fixed a bug in the type constants that caused int32 to go out
2557 as uint16 over the wire
2558 * python/dbus.py: split up into different files and renamed _dbus.py
2559 * python/__init__.py, python/_util.py, python/decorators.py,
2560 python/exceptions.py, python/proxies.py, python/services.py,
2561 python/types.py: new files split off from dbus.py
2562 * python/Makefile.am: Add new files, remove dbus.py and
2563 install all python files to <python module dir>/dbus
2564 * python/examples/*: Added #!/usr/bin/env python to the top of
2565 every example. Patch provided by Tatavarty Kalyan
2567 2005-04-25 John (J5) Palmieri <johnp@redhat.com>
2569 * NEWS: Update to 0.33
2571 2005-04-25 John (J5) Palmieri <johnp@redhat.com>
2573 * python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
2574 method for doing async calls
2575 (_pending_call_notification): New C function for handling pendning call
2577 (set_notify): New method for setting pending call notification
2579 * python/dbus.py: new version tuple "version" is set at (0, 40, 0)
2580 Async capabilities added to remote method calls
2581 (Sender): class removed
2582 (RemoteService): class removed
2583 (ObjectTree): class removed for now
2584 (RemoteObject): Renamed to ProxyObject
2585 (RemoteMethod): Renamed to ProxyMethod
2586 (method): Decorator added for decorating python methods as dbus methods
2587 (signal): Decorator added for decorating python methods as signal emitters
2588 (ObjectType): Metaclass added for generating introspection data and the
2589 method callback vtable
2590 (Interface): Wrapper class added to wrap objects in a dbus interface
2591 (Object): Uses ObjectType as its metaclass and exports Introspect
2592 of the org.freedesktop.DBus.Introspectable interface
2593 (ValidationException, UnknownMethodException): new exceptions
2595 * python/examples/*: Modified to fit with the new bindings
2597 2005-04-23 Havoc Pennington <hp@redhat.com>
2599 * dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
2600 reported by Tony Houghton
2602 * test/test-service.c (main): test
2603 dbus_connection_get_object_path_data()
2605 * dbus/dbus-object-tree.c (find_handler): be sure we always init
2607 (_dbus_object_tree_get_user_data_unlocked): new function used by
2608 dbus_connection_get_object_path_data()
2609 (do_register): add assertion test for get_user_data_unlocked
2610 (object_tree_test_iteration): more tests
2612 * dbus/dbus-connection.c (dbus_connection_get_object_path_data):
2613 new function from Dan Reed to let you get the user data from
2614 dbus_connection_register_object_path()
2616 2005-04-23 John (J5) Palmieri <johnp@redhat.com>
2618 * dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
2619 in numerous places that did not account for the NULL terminator
2620 (signature_from_seed): changed the manual string copy loop to
2621 just use strcpy instead
2622 make check should now pass
2624 2005-04-19 John (J5) Palmieri <johnp@redhat.com>
2626 * dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
2627 so that it allows messages that are not signals to pass in
2628 NULL as the interface.
2630 2005-04-18 David Zeuthen <davidz@redhat.com>
2632 * glib/dbus-gmain.c (io_handler_destroy_source):
2633 (timeout_handler_destroy_source, connection_setup_free):
2634 Also unref the source to avoid memory leaks.
2636 2005-04-13 David Zeuthen <davidz@redhat.com>
2638 * bus/config-parser.c (bus_config_parser_new): Bump this to a
2639 more reasonable, yet still totally arbitrary, value :-).
2641 2005-04-13 David Zeuthen <davidz@redhat.com>
2643 * doc/TODO: Added an "important for 1.0" item about selinux
2646 2005-04-13 David Zeuthen <davidz@redhat.com>
2648 * bus/selinux.c: Add c-file-style to top of file
2649 (log_audit_callback): Don't free the data here anymore
2650 (bus_selinux_check): Don't take spid and tpid since appending
2651 that to auxdata may OOM.
2652 (bus_selinux_allows_acquire_service): Handle OOM and signal back
2653 to the caller if we are OOM by taking an error object.
2654 (bus_selinux_allows_send): -do-
2656 * bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
2657 and bus_selinux_allows_send
2659 * bus/bus.c (bus_context_check_security_policy): Pass error and
2660 pass on OOM thrown by bus_selinux_allows_send()
2662 * bus/services.c (bus_registry_acquire_service): Pass error and
2663 pass on OOM thrown by bus_selinux_allows_acquire_service()
2665 2005-04-13 Havoc Pennington <hp@redhat.com>
2667 * glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
2668 message at a time to avoid monopolizing the main loop, bug
2669 #2953 from Benjamin Otte
2671 2005-04-09 Havoc Pennington <hp@redhat.com>
2673 * dbus/dbus-string.c (copy): change a memcpy to memmove due to
2674 possible overlap, fix from Daniel Reed
2675 (fixup_alignment): fix signedness warnings
2676 (_dbus_string_append_unichar): ditto
2678 2005-04-09 Havoc Pennington <hp@redhat.com>
2680 * dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
2682 * glib/dbus-glib-tool.c (main): fix warning
2684 * glib/dbus-binding-tool-glib.c (generate_glue): fix warning
2686 * dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
2687 add a new function that can be used in simple applications that
2688 don't have a main loop and are willing to block
2690 2005-04-05 David Zeuthen <davidz@redhat.com>
2692 Fix https://bugs.freedesktop.org/show_bug.cgi?id=2889
2694 * glib/dbus-gmain.c:
2695 (io_handler_destroy_source): Remove from list of IO handlers
2696 of the ConnectionSetup object
2697 (timeout_handler_destroy_source): -do- for timeout handlers
2698 (io_handler_source_finalized): Don't remove from list since
2699 we now do that in io_handler_destroy_source(). Renamed from
2700 io_handler_source_destroyed
2701 (timeout_handler_source_destroyed): -do- for timeout handlers
2702 (connection_setup_free): It is now safe to iterate over all
2703 IO and timeout handlers as the _destroy_source removes them
2704 from the list synchronously
2706 2005-03-30 Havoc Pennington <hp@redhat.com>
2708 * configure.in: change check to gtk 2.4
2710 * tools/dbus-viewer.c (name_combo_changed_callback): remove
2711 gtk_combo_box_get_active_text() usage to decrement GTK requirement
2714 2005-03-29 John (J5) Palmieri <johnp@redhat.com>
2718 * HACKING: Fixed realease instructions. configure.in should be updated to
2719 the next release by the person who made the last release.
2721 2005-03-29 John (J5) Palmieri <johnp@redhat.com>
2723 * python/lvalue_cast_post_process.py - removed. Patch has been
2724 submitted to Pyrex maintainers that fixes gcc4.0 errors
2726 * python/Makefile.am: removed refrences to lvalue_cast_post_process.py
2728 2005-03-24 Daniel Reed <n@ml.org>
2730 * tools/Makefile.am: Make print-introspect and
2731 dbus-bus-introspect.xml building conditional on HAVE_GLIB.
2733 2005-03-22 John (J5) Palmieri <johnp@redhat.com>
2735 * tools/Makefile.am: Patch by Colin Walters that fixes distcheck
2737 * dbus/dbus-userdb.c, dbus/dbus-userdb-util.c: Add patch we have
2738 had in Red Hat packages for a while but for some reason never
2740 (_dbus_is_a_number): New checks if a string
2741 can be converted to a number and does the conversion if it can
2742 (_dbus_user_database_lookup): Add check to see if the given username
2743 is a udi. This allows udi's to be used instead of usernames in the
2745 (_dbus_user_database_lookup_group): Add check to see if the given groupname
2746 is a gdi. This allows gdi's to be used instead of groupnames in the
2749 2005-03-21 John (J5) Palmieri <johnp@redhat.com>
2751 * python/lvalue_cast_post_process.py - added post processor to fix Pyrex
2752 code so that it compiles with gcc4.0
2754 * python/Makefile.am: Added lvalue_cast_post_process.py to EXTRA_DIST
2755 run dbus_bindings.c through lvalue_cast_post_process.py and copy the
2756 results back to dbus_binding.c
2758 2005-03-20 Colin Walters <walters@verbum.org>
2760 Patch suggested by Inguva Rajasekhar <ringuva@novell.com>.
2762 * configure.in: Require GTK+ 2.6.
2764 2005-03-20 Colin Walters <walters@verbum.org>
2766 * Makefile.am (SUBDIRS, DIST_SUBDIRS): Build tools before test.
2768 2005-03-17 Tom Parker <palfrey@tevp.net>
2770 * dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
2771 print DBUS_UID_UNSET; instead print passed username. Also
2772 be sure to actually use gid looked up in cache.
2774 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
2775 for DBUS_GID_UNSET and groupname.
2777 2005-03-17 Colin Walters <walters@verbum.org>
2779 * bus/print-introspect.c: Move to tools/.
2780 * bus/run-with-tmp-session-bus.sh: Ditto.
2782 * glib/Makefile.am (dbus-glib-bindings.h): Move
2783 generation to tools/Makefile.am.
2785 * test/glib/run-test.sh: Update to handle move
2786 of run-with-tmp-session-bus.sh.
2788 * test/glib/test-service-glib.c: Update to handle
2789 move of dbus-glib-bindings.h.
2791 * tools/print-introspect.c: Moved here
2792 from bus/, and ported to GLib bindings.
2794 * tools/run-with-tmp-session-bus.sh: Moved here
2797 * tools/Makefile.am: Generate dbus-glib-bindings.h
2798 and dbus-bus-introspect.xml here.
2800 * tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
2803 2005-03-17 Colin Walters <walters@verbum.org>
2805 * bus/driver.c (write_args_for_direction): Use
2806 _dbus_string_get_const_data to retrieve string;
2807 _dbus_string_get_const_data_len doesn't actually return
2808 a NULL-terminated substring.
2810 * test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
2811 (main): Change to use org_freedesktop_DBus_request_name
2812 instead of using g_proxy_begin_call/end_call.
2814 2005-03-15 Joe Shaw <joeshaw@novell.com>
2816 * mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
2817 generating the finalizer. Fixes from Ben Maurer.
2819 2005-03-12 Joe Shaw <joeshaw@novell.com>
2821 * mono/BusDriver.cs: Update method names: ListServices
2822 becomes ListNames; GetOwner becomes GetNameOwner.
2824 * mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
2825 onto the eval stack when removing the delegate.
2827 2005-03-12 Joe Shaw <joeshaw@novell.com>
2829 * mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
2830 LT_CURRENT. Set it to the autoconf variable.
2832 * mono/ProxyBuilder.cs: Add a finalizer to the generated proxy
2833 classes that disconnects the signal handler delegate from the
2834 service object. Fixes a big leak of proxy objects on the
2835 client side of things. Patch from Ben Maurer
2836 <bmaurer@ximian.com>
2838 2005-03-12 Colin Walters <walters@verbum.org>
2840 * bus/driver.c (write_args_for_direction): New function,
2841 parses a type signature into arguments and outputs to
2843 (bus_driver_handle_introspect): Use it instead of
2844 hardcoding XML for certain signatures.
2846 * bus/Makefile.am (dbus-bus-introspect.xml): Add
2847 dependency on dbus-daemon.
2849 * glib/dbus-glib-tool.c (main): Parse ignore_unsupported
2850 argument, pass it to dbus_binding_tool_output_glib_client.
2852 * glib/dbus-binding-tool-glib.c
2853 (generate_client_glue): Protect against multiple inclusion.
2854 (dbus_binding_tool_output_glib_client): Add
2855 G_BEGIN_DECLS/G_END_DECLS.
2857 * glib/dbus-binding-tool-glib.c (compute_client_method_name):
2858 Change to just take iface prefix directly.
2859 (write_formal_parameters): Clarify error message.
2860 (check_supported_parameters): New function; checks to see type
2861 signatures of method parameters are supported.
2862 (generate_client_glue): Handle ignore_unsupported flag.
2863 (dbus_binding_tool_output_glib_client): Handle ignore_unsupported
2866 * glib/Makefile.am (dbus-glib-bindings.h): Pass
2867 --ignore-unsupported by default until glib bindings
2870 2005-03-11 Colin Walters <walters@verbum.org>
2872 * glib/Makefile.am: Generate dbus-glib-bindings.h and
2875 * bus/print-introspect.c: New file; prints introspection
2876 data for a given name and object path.
2878 * bus/run-with-tmp-session-bus.sh: New file, refactored
2879 from test/glib/run-test.sh. Creates a temporary session
2880 bus and runs another program.
2882 * test/glib/run-test.sh: Refactor to invoke
2883 run-with-tmp-session-bus.sh.
2885 * bus/driver.c (bus_driver_handle_introspect): Fix to print new
2886 introspection format. Also change to use DBUS_TYPE_x_AS_STRING
2887 macros instead of hardcoding.
2889 * glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
2891 2005-03-11 Joe Shaw <joeshaw@novell.com>
2893 * dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
2894 this unref; it doesn't match up evenly in some codepaths.
2895 (_dbus_connection_block_pending_call): Unref at every exitpoint;
2896 this evenly matches with the ref near the top of this function.
2898 2005-03-09 Joe Shaw <joeshaw@novell.com>
2900 * dbus/dbus-object-tree.c
2901 (_dbus_object_tree_unregister_and_unlock): If checks are enabled
2902 and we try to unregister a path that's not registered, still go
2903 through the process of unlocking and don't just return.
2905 2005-03-09 Colin Walters <walters@verbum.org>
2907 * glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
2908 to this are generated for client-side wrappers. Invokes a
2909 D-BUS method and returns reply values.
2911 * glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
2912 function; writes signature string for argument direction.
2913 (write_args_for_direction): Change to pass input values directly
2914 instead of via address, and fix indentation.
2915 (generate_client_glue): Change to invoke dbus_g_proxy_invoke. Also
2916 make generated wrappers inlineable.
2918 * dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
2919 note about using dbus_type_is_fixed.
2921 * dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
2922 dbus/dbus-signature.c as dbus_type_is_fixed.
2924 All callers updated.
2926 * dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
2927 from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
2929 * dbus/dbus-signature.h: Prototype.
2931 * glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
2934 * test/glib/test-dbus-glib.c (main): Be sure to clear error as
2935 appropriate instead of just freeing it.
2936 (main): Free returned strings using g_free.
2938 * test/glib/Makefile.am (test-service-glib-glue.h)
2939 (test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
2941 * glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
2942 simply maps a simple D-BUS type to GType.
2943 (dbus_dbus_type_to_gtype): Function which maps D-BUS type to
2945 (dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
2946 initialize the value with it.
2947 (dbus_gvalue_binding_type_from_type): Unused, delete.
2948 (dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
2949 various types instead of unmarshalling to value data directly.
2950 Remove can_convert boolean.
2951 (dbus_gvalue_marshal): Remove duplicate initialization; switch to
2952 returning directly instead of using can_convert boolean.
2953 (dbus_gvalue_store): New function; not related to D-BUS per-se.
2954 Stores a GValue in a pointer to a value of its corresponding C
2957 * glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
2958 add dbus_gvalue_store.
2960 2005-03-08 Joe Shaw <joeshaw@novell.com>
2962 Fix a bunch of lifecycle and memory management problems
2963 in the mono bindings.
2965 * mono/Arguments.cs (Arguments): Implement IDisposable
2967 * mono/Bus.cs (Bus): Don't allow public instantiation. This is
2968 strictly a static class.
2970 * mono/Connection.cs: Move the DBusObjectPathVTable and associated
2971 delegates into this file.
2972 (Connection): Implement IDisposable.
2973 (Dispose): Disconnect the connection and set the raw connection
2974 pointer to IntPtr.Zero.
2975 (~Connection): Call Dispose().
2976 (RegisterObjectPath): Added. Manages the registration of object
2977 paths so we can cleanly disconnect them at dispose/finalize time.
2978 (UnregisterObjectPath): Ditto.
2979 (set_RawConnection): Unregister all of the object paths when
2980 changing the underlying DBusConnection. Add them back onto the
2981 new connection, if any.
2983 * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
2984 more unmanaged resources anymore, so it's not necessary. Move all
2985 the DBusObjectPathVTable stuff out of here.
2986 (Handler): Save references to our delegates so that they don't get
2987 finalized. Call Connection.RegisterObjectPath() instead of
2988 dbus_connection_register_object_path() directly.
2989 (Message_Called): Dispose the message after we're finished with
2992 * mono/Message.cs (Message): Implement IDisposable.
2993 (Dispose): Dispose the Arguments, and set the RawMessage to
2995 (SendWithReplyAndBlock): We own the ref to the reply that comes
2996 back from dbus_connection_send_with_reply_and_block() so add a
2997 comment about that and unref it after we've constructed a managed
2998 MethodReturn class around it. Fixes a big, big leak.
3000 * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
3002 (BuildSignalHandler): After we've sent the Signal message, dispose
3004 (BuildMethod): Dispose of the method call and reply messages after
3005 we've sent the message and extracted the data we want from the
3008 * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
3010 (Service_FilterCalled): Dispose of the message after we're
3013 2005-03-08 Joe Shaw <joeshaw@novell.com>
3015 * dbus/dbus-connection.c (dbus_connection_send_with_reply):
3016 After we attach our pending call to the connection, unref
3019 * mono/Connection.cs (set_RawConnection): Disconnect our
3020 filter and match callbacks from the old connection and
3021 reconnect them to the new connection, if any.
3023 * mono/DBusType/Array.cs: "Code" is a static member, so
3024 don't use "this" to refer to it. Fix for stricter checking
3027 * mono/DBusType/ObjectPath.cs (Append): Don't leak the
3028 object path that we pass into unmanaged code.
3030 * mono/DBusType/String.cs (Append): Don't leak the string
3031 that we pass into unmanged code.
3033 2005-03-07 John (J5) Palmieri <johnp@redhat.com>
3034 * NEWS: Update for 0.31
3036 * configure.in: Release 0.31
3037 add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
3039 * qt/Makefile.am: fixed build
3041 * dbus/Makefile.am: soname bump for libdbus
3043 * glib/Makefile.am: soname bump for libdbus-glib
3045 2005-03-05 Havoc Pennington <hp@redhat.com>
3047 * dbus/dbus-sysdeps.c:
3048 (pseudorandom_generate_random_bytes_buffer): fix to have no return
3050 (_dbus_generate_random_bytes_buffer): fix return value
3052 * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
3053 checks actually work, from Tom Parker <fdo@tevp.net>
3055 2005-03-01 Colin Walters <walters@verbum.org>
3057 * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
3058 functions copied from dbus-glib-tool.c.
3059 (main): Convert lots of error code to use them.
3060 Also add some testing for introspection bits.
3062 2005-03-01 Colin Walters <walters@verbum.org>
3064 * doc/TODO: Remove introspection signature TODO.
3066 2005-02-27 Colin Walters <walters@verbum.org>
3068 * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
3069 Change return value to const char * instead of int so we can do
3071 (struct PropertyInfo, struct ArgInfo): Store char *.
3072 (property_info_new, arg_info_new): Update parameters, strdup.
3073 (property_info_unref, arg_info_unref): Free.
3075 * glib/dbus-gidl.h: Update prototypes.
3077 * glib/dbus-gparser.c (basic_type_from_string): Delete.
3078 (validate_signature): New function, just validates signature and
3080 (parse_property, parse_arg): Invoke validate_signature. Store
3081 signature instead of just type code.
3083 * glib/dbus-gvalue.c (base_type_from_signature): New utility
3084 function to return a primary type for a signature, dropping
3085 information about types in container types.
3086 (dbus_gvalue_genmarshal_name_from_type)
3087 (dbus_gvalue_binding_type_from_type)
3088 (dbus_gvalue_ctype_from_type): Update to take full signature
3089 instead of type code.
3090 (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
3092 * glib/dbus-gvalue.h: Update prototypes for above.
3094 * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
3095 glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
3096 (introspect_properties, introspect_signals, write_interface):
3097 Update to handle signatures, and remove usage of
3098 _dbus_gutils_type_to_string.
3099 (handle_introspect): Print out type codes instead of e.g. "string"
3100 in hardcoded introspection XML; also use x_AS_STRING constants
3101 instead of hardcoding in string.
3103 * glib/dbus-glib-tool.c (pretty_print): Handle signature change
3104 to string. Remove usage of _dbus_gutils_type_to_string.
3106 * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
3108 * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
3111 * glib/dbus-binding-tool-glib.c (compute_marshaller)
3112 (compute_marshaller_name, generate_glue): Handle signature change
3114 (write_formal_parameters, write_args_for_direction): Ditto, and
3117 * tools/dbus-tree-view.c (type_to_string): Delete.
3118 (info_set_func_text): Update to print full signatures.
3120 * test/glib/test-service-glib.xml: Change types to new
3121 introspection format.
3123 2005-02-26 Havoc Pennington <hp@redhat.com>
3125 * doc/TODO: remove the "guid" item
3127 * test/glib/test-profile.c (no_bus_thread_func): use open_private
3128 (with_bus_thread_func): use open_private
3130 * dbus/dbus-connection.c (dbus_connection_open_private): new
3131 function that works like the old dbus_connection_open()
3132 (dbus_connection_open): now returns an existing connection if
3135 * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
3136 through the GUID to the transport
3138 * dbus/dbus-server.c (_dbus_server_init_base): keep around the
3139 GUID in hex-encoded form.
3141 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3142 pass GUID argument in to the transport
3144 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
3147 * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
3149 * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
3151 2005-02-25 Havoc Pennington <hp@redhat.com>
3153 * doc/dbus-specification.xml: document the GUID thing
3155 * dbus/dbus-server.c (_dbus_server_init_base): initialize a
3156 globally unique ID for the server, and put a "guid=hexencoded"
3157 field in the address
3159 * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
3161 * dbus/dbus-message.c: ditto
3163 * dbus/dbus-dataslot.c: ditto
3165 * dbus/dbus-list.c: ditto
3167 * dbus/dbus-internals.h: wait, just include
3168 dbus-threads-internal.h here
3170 * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
3173 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
3175 2005-02-24 Colin Walters <walters@verbum.org>
3177 * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
3179 2005-02-24 John (J5) Palmieir <johnp@redhat.com>
3181 * glib/Makefile.am: added dbus-gobject.h to sources list
3182 so distcheck doesn't fail
3184 2005-02-24 Havoc Pennington <hp@redhat.com>
3186 * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
3187 you must disconnect before unref, since locking and other things
3188 are screwed up otherwise. Fix assorted other locking stuff.
3190 * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
3193 * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
3194 into a private header and don't export from the library
3196 * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
3198 2005-02-24 Colin Walters <walters@verbum.org>
3200 * dbus/dbus-signature.c: New file; implements various functions
3201 related to type signatures. Includes an interator for parsing,
3202 validation functions.
3203 (dbus_type_is_basic): Moved here from
3204 dbus-marshal-basic.c:_dbus_type_is_basic.
3205 (dbus_type_is_container): Moved here from
3206 dbus-marshal-basic.c:_dbus_type_is_container.
3208 All callers of _dbus_type_is_container and _dbus_type_is_basic
3209 updated, and include dbus-signature.h.
3211 * dbus/dbus-signature.h: New file; prototypes for the above.
3213 * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
3216 * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
3217 function factored out of _dbus_first_type_in_signature.
3218 (_dbus_first_type_in_signature_c_str): New function; returns first
3219 type code for a type signature character.
3221 * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
3222 handle function moves.
3224 * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
3226 * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
3227 function; skips to next complete type in type signature.
3228 Implemented using previous skip_one_complete_type. Now
3229 skip_one_complete_type just delegates to
3230 _dbus_type_signature_next.
3232 * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
3234 (_dbus_type_is_container): Ditto.
3236 * doc/dbus-specification.xml: Update introspection sample to
3237 use real type signatures.
3239 * dbus/dbus-test.h: Prototype signature test.
3241 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
3244 * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
3246 2005-02-23 John (J5) Palmieri <johnp@redhat.com>
3248 * python/dbus_bindings.pyx.in (PendingCall::get_reply):
3249 s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
3251 2005-02-21 Colin Walters <walters@verbum.org>
3253 * dbus/dbus-test-main.c (main): Take optional specific test
3256 * dbus/dbus-test.c (run_test): New function, runs a test function
3257 with no data directory.
3258 (run_data_test): Like above, but takes data directory.
3259 (dbus_internal_do_not_use_run_tests): Take
3260 specific test argument. Replace lots of cut n' paste code
3261 with run_test and run_data_test.
3263 * dbus/dbus-test.h: Update prototype for
3264 dbus_internal_do_not_use_run_tests.
3266 2005-02-20 Havoc Pennington <hp@redhat.com>
3268 Fix bugs reported by Daniel P. Berrange
3270 * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
3271 (protected_change_watch): new function
3272 (_dbus_server_toggle_watch, _dbus_server_remove_watch)
3273 (_dbus_server_add_watch): change to work like the
3274 dbus-connection.c equivalents; like those, probably kind of
3275 busted, but should at least mostly work for now
3276 (dbus_server_disconnect): drop the lock if we were already
3277 disconnected, patch from Daniel P. Berrange
3279 * dbus/dbus-server.c (_dbus_server_toggle_timeout)
3280 (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
3283 * doc/TODO: todo about unscrewing this mess
3285 2005-02-19 Colin Walters <walters@verbum.org>
3287 * glib/dbus-binding-tool-glib.c
3288 (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
3290 * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
3291 as errno.h and sys/stat.h.
3292 (lose): New function, prints error with
3294 (lose_gerror): Similar, but takes GError for message.
3295 (main): Add --output argument to specify output file to write to,
3296 instead of always printing to stdout. In this mode, determine
3297 timestamps on source files to see whether any are newer than the
3298 target file. If not, exit. Also convert a number of error
3299 messages to use lose (since it's shorter), and switch to using
3300 g_io_channel_shutdown.
3302 2005-02-19 Havoc Pennington <hp@redhat.com>
3304 * glib/dbus-gobject.c
3305 (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
3307 * glib/dbus-glib.c: fix doxygen warnings
3309 * glib/dbus-gparser.c (parse_annotation): error if an annotation
3310 is found on an <arg>
3312 2005-02-17 Colin Walters <walters@verbum.org>
3314 * glib/dbus-gobject.h: Don't export
3315 _dbus_glib_marshal_dbus_message_to_gvalue_array.
3317 * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
3318 (invoke_object_method): Handle it.
3320 * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
3323 2005-02-17 Colin Walters <walters@verbum.org>
3325 * bus/.cvsignore, doc/.cvsignore
3326 * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
3329 2005-02-17 Colin Walters <walters@verbum.org>
3331 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
3332 Rename to DBUS_SERVICE_DBUS.
3333 (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
3334 (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
3335 Change the value from "org.freedesktop.Local"
3336 to "org.freedesktop.DBus.Local".
3337 (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
3338 (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
3339 DBUS_INTERFACE_INTROSPECTABLE.
3340 Change the value from "org.freedesktop.Introspectable"
3341 to "org.freedesktop.DBus.Introspectable".
3342 (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
3343 DBUS_INTERFACE_PROPERTIES.
3344 Change the value from "org.freedesktop.Properties"
3345 to "org.freedesktop.DBus.Properties".
3346 (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
3347 DBUS_INTERFACE_PEER.
3348 Change the value from "org.freedesktop.Peer"
3349 to "org.freedesktop.DBus.Peer".
3350 (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
3351 DBUS_INTERFACE_LOCAL.
3352 Change the value from "org.freedesktop.Local"
3353 to "org.freedesktop.DBus.Local".
3355 All other users of those constants have been changed.
3357 * bus/driver.c (bus_driver_handle_introspect): Use constants.
3359 * glib/dbus-gobject.c (handle_introspect): Use constants.
3361 * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
3363 2005-02-17 Colin Walters <walters@verbum.org>
3365 * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
3366 (parse_node, parse_interface, parse_method, parse_signal)
3367 (parse_property, parse_annotation): Lose if we're currently in an
3369 (parse_annotation): New function.
3370 (parser_start_element, parser_end_element): Handle annotation.
3371 (parse_method, parse_interface): Remove support for c_name attribute,
3372 switch to annotations.
3374 * glib/dbus-gidl.h (interface_info_get_binding_names)
3375 (method_info_get_binding_names)
3376 (interface_info_get_binding_name, method_info_get_binding_name)
3377 (interface_info_set_binding_name, method_info_set_binding_name):
3379 (interface_info_get_annotations, method_info_get_annotations)
3380 (interface_info_get_annotation, method_info_get_annotation)
3381 (interface_info_add_annotation, method_info_add_annotation):
3384 * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
3386 (struct MethodInfo): Ditto.
3387 Straightfoward conversion of binding methods into annotation methods
3390 * glib/dbus-glib-tool.c (pretty_print): Print annotations.
3392 * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
3394 * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
3395 Use new annotation API.
3397 * doc/introspect.dtd: Fix a number of DTD syntax errors. Add
3400 * doc/dbus-specification.xml: Discuss introspection annotations,
3401 include list of well-known annotations.
3403 * test/glib/test-service-glib.xml: Make validate against new DTD.
3405 2005-02-17 Colin Walters <walters@verbum.org>
3407 This patch is based on initial work from
3408 Paul Kuliniewicz <kuliniew@purdue.edu>.
3410 * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
3411 initialization of GValue from dbus type to here.
3412 (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
3413 for the "glib-genmarshal" program from a DBus type.
3414 (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
3415 into the C name for it we use in the glib bindings.
3416 (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
3417 glib C type (not GValue).
3418 (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
3420 * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
3421 from dbus-gobject.c.
3423 * glib/dbus-gutils.h: Prototype it.
3425 * glib/dbus-gproxy.c: Include new dbus-gobject.h.
3426 (marshal_dbus_message_to_g_marshaller): Use new shared function
3427 dbus_glib_marshal_dbus_message_to_gvalue_array.
3429 * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
3430 Will be changed once we have annotations.
3432 * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
3433 GStaticRWLock. Callers updated.
3434 (wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
3435 (string_table_next): New function for iterating over zero-terminated
3437 (string_table_lookup): New function; retrieves specific entry in
3439 (get_method_data): New function; look up method data in object data chunk.
3440 (object_error_domain_prefix_from_object_info)
3441 (object_error_code_from_object_info): New functions, but not implemented yet.
3442 (method_interface_from_object_info): New function; retrieve interface name.
3443 (method_name_from_object_info): New function; retrieve method name.
3444 (method_arg_info_from_object_info): New function; retrieve argument data.
3445 (arg_iterate): New function; iterates over serialized argument data.
3446 (method_dir_signature_from_object_info): New function; returns a
3447 GString holding type signature for arguments for just one
3448 direction (input or output).
3449 (method_input_signature_from_object_info)
3450 (method_output_signature_from_object_info): New functions.
3451 (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
3452 converts dbus message arguments into a GValue array. Used for both
3453 signal handling and method invocation.
3454 (struct DBusGlibWriteIterfaceData): New utility structure.
3455 (write_interface): New function; generate introspection XML for
3457 (introspect_interfaces): New function; gathers all interface->methods,
3458 generates introspection XML for them.
3459 (handle_introspect): Invoke introspect_interfaces.
3460 (get_object_property): Be sure to zero-initalize stack-allocated GValue.
3461 (lookup_object_and_method): New function; examines an incoming message
3462 and attempts to match it up (via interface, method name, and argument
3463 signature) with a known object and method.
3464 (gerror_domaincode_to_dbus_error_name): New function; converts a
3465 GError domain and code into a DBus error name. Needs GError data
3466 added to object introspection to work well.
3467 (gerror_to_dbus_error_message): Creates a DBusMessage error return from
3469 (invoke_object_method): New function to invoke an object method
3470 looked up via lookup_object_and_method. Parses the incoming
3471 message, turns it into a GValue array, then invokes the marshaller
3472 specified in the DBusGMethodInfo. Creates a new message with
3473 either return values or error message as appropriate.
3474 (gobject_message_function): Invoke lookup_object_and_method and
3475 invoke_object_method.
3477 * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
3478 (enum DBusBindingOutputMode): New enum for binding output modes.
3479 (pretty_print): Print binding names.
3480 (dbus_binding_tool_error_quark): GError bits.
3481 (version): Fix typo.
3482 (main): Create GIOChannel for output. Parse new --mode argument,
3483 possible values are "pretty-print", "glib-server", "glib-client".
3484 Use mode to invoke appropriate function.
3486 * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
3488 * glib/dbus-glib-tool.h: New header, just includes GError bits
3491 * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
3492 maps binding style to name.
3493 (struct MethodInfo): Ditto.
3494 (get_hash_keys, get_hash_key): Utility function, returns keys for
3496 (interface_info_new, method_info_new): Initialize bindings.
3497 (interface_info_unref, method_info_unref): Destroy bindings.
3498 (method_info_get_binding_names, method_info_get_binding_name)
3499 (interface_info_get_binding_names, interface_info_get_binding_name):
3500 Functions for retrieving binding names.
3501 (method_info_set_binding_name, interface_info_set_binding_name):
3502 Functions for setting binding names.
3504 * glib/dbus-binding-tool-glib.h: New file, has prototypes
3505 for glib binding generation.
3507 * glib/dbus-binding-tool-glib.c: New file, implements server-side
3508 and client-side glib glue generation.
3510 * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
3511 dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
3514 * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
3515 of using GClosureMarshal directly.
3516 (struct DBusGObjectInfo): Add n_infos member.
3518 * test/glib/test-service-glib.xml: New file; contains introspection data
3519 for MyTestObject used in test-service-glib.c.
3521 * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
3522 (my_object_do_nothing, my_object_increment, my_object_throw_error)
3523 (my_object_uppercase, my_object_many_args): New test methods.
3524 (main): Use dbus_g_object_class_install_info to include generated object
3527 * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
3528 as well as client-side bindings.
3530 * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
3531 (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
3532 using both the dbus_gproxy stuff directly as well as the generated bindings.
3534 2005-02-15 Havoc Pennington <hp@redhat.com>
3536 * dbus/dbus-connection.c (dbus_connection_dispatch): always
3537 complete a pending call, don't run filters first.
3539 * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
3540 dbus_pending_call_steal_reply
3542 * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
3543 _dbus_connection_block_pending_call
3544 (dbus_pending_call_get_reply): change to steal_reply and return a
3547 * dbus/dbus-connection.c
3548 (dbus_connection_send_with_reply_and_block): port to work in terms
3550 (_dbus_connection_block_pending_call): replace block_for_reply
3553 2005-02-14 Havoc Pennington <hp@redhat.com>
3555 * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
3556 properly handle looking up group information by name; fix
3559 2005-02-13 Havoc Pennington <hp@redhat.com>
3561 * dbus/dbus-connection.c (dbus_connection_return_message)
3562 (dbus_connection_borrow_message): hold dispatch lock while message
3564 (_dbus_connection_block_for_reply): hold dispatch lock while we
3565 block for the reply, so nobody steals our reply
3566 (dbus_connection_pop_message): hold the dispatch lock while we
3569 2005-02-13 Havoc Pennington <hp@redhat.com>
3571 * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
3572 (_dbus_connection_release_dispatch)
3573 (_dbus_connection_acquire_io_path)
3574 (_dbus_connection_release_io_path): make the mutex and condvar
3575 control access to the "acquired" flag. Drop the connection lock
3576 while waiting on the condvar. Hopefully these are baby steps in
3577 roughly the right direction.
3579 2005-02-13 Havoc Pennington <hp@redhat.com>
3581 * dbus/dbus-connection.c: use separate mutexes for the condition
3582 variables; this is some kind of baseline for sanity, but the
3583 condition variables still aren't used correctly afaict
3585 2005-02-13 Havoc Pennington <hp@redhat.com>
3587 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3590 * dbus/dbus-connection.c
3591 (_dbus_connection_detach_pending_call_unlocked): add this
3593 Initial semi-correct pass through to fix thread locking; there are
3594 still some issues with the condition variable paths I'm pretty
3597 * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
3600 * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
3601 rename to add _unlocked
3602 (struct DBusConnection): move "dispatch_acquired" and
3603 "io_path_acquired" to use only one bit each.
3604 (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
3605 (dbus_connection_set_watch_functions): hacky fix to reentrancy
3606 (_dbus_connection_add_watch, _dbus_connection_remove_watch)
3607 (_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
3608 (_dbus_connection_remove_timeout)
3609 (_dbus_connection_toggle_timeout): drop lock when calling out to
3610 user functions; done in a hacky/bad way.
3611 (_dbus_connection_send_and_unlock): add a missing unlock
3612 (_dbus_connection_block_for_reply): add a missing unlock
3614 * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
3615 drop lock in a hacky probably unsafe way to call out to user
3618 2005-02-12 Havoc Pennington <hp@redhat.com>
3620 * tools/dbus-tree-view.c (info_set_func_text): display more
3623 * bus/driver.c (bus_driver_handle_list_services): list the bus
3626 * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
3628 * glib/dbus-gidl.c (signal_info_get_n_args): new function
3629 (method_info_get_n_args): new function
3631 2005-02-12 Havoc Pennington <hp@redhat.com>
3633 * bus/driver.c (bus_driver_handle_introspect): add introspection
3636 2005-02-12 Havoc Pennington <hp@redhat.com>
3638 * bus/driver.c: put the signature of each bus driver method in the
3639 table of handlers and check it on incoming calls; this isn't
3640 really useful, but going to add introspect support in a minute.
3642 2005-02-11 Joe Shaw <joeshaw@novell.com>
3644 * mono/Connection.cs: The unpredictability of finalizers in mono
3645 prevents us from deterministically disconnecting the filters from
3646 the Service class's finalizer, so move tracking of filters and
3647 matches here. Add API for that.
3649 * mono/Service.cs: Remove the code, add code which calls the
3650 methods now on the Connection class.
3652 2005-02-11 John (J5) Palmieri <johnp@redhat.com>
3654 * python/dbus.py (class Sender): added to support dbus signals better
3655 (Bus::add_signal_receiver): added expand_args parameter which defaults
3656 to True. When expand args is True the signal handler will pass the
3657 message arguments as parameters to the signal handler. If False
3658 revert to previous behavior where the signal handler must get the
3659 argument list from the message. This is to help port applications
3660 like HAL that have a tendancy to send variable length argument lists.
3661 self._match_rule_to_receivers is now a dict of dicts.
3662 (Bus::remove_signal_receiver): pop handler off the dict intead of
3663 removing it from a list
3664 (Bus::_signal_func): change signal handlers so that interface,
3665 signal_name, service, path and message are packed into a Sender
3666 object and that is passed to the handler. If expand_args is True
3667 extract the args list from the message and append it to the parameter
3670 * python/dbus_bindings.pyx.in (class Signature): added to support
3672 (MessageIter::__init__): changed iteration limit to match D-BUS
3673 (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY,
3674 STRUCT and VARIENT type support
3675 (MessageIter::python_value_to_dbus_sig): made recursive to support
3677 (MessageIter::append*): added Signature, dict, tuple
3680 * python/examples/example-client.py: added examples of getting tuples
3683 * python/examples/example-service.py: added examples of sending tuples
3686 * python/examples/example-signal-recipient.py: Fixed to handle new
3687 signal callback format
3689 2005-02-10 Havoc Pennington <hp@redhat.com>
3691 * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
3692 (call dbus_g_proxy_add_signal)
3694 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
3696 (_dbus_server_new_for_domain_socket): escape the path
3698 * dbus/dbus-address.c (dbus_address_escape_value): new
3699 (dbus_address_unescape_value): new
3700 (dbus_parse_address): unescape values
3702 * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
3704 * doc/dbus-specification.xml: explain how to escape values in
3707 2005-02-10 Havoc Pennington <hp@redhat.com>
3709 * dbus/dbus-message-factory.c (generate_special): modify test to
3710 avoid using a non-basic dict key
3712 * dbus/dbus-marshal-validate-util.c: add test for the below
3714 * doc/dbus-specification.xml: require that dict keys are a basic
3717 * dbus/dbus-marshal-validate.c
3718 (_dbus_validate_signature_with_reason): require that dict key is a
3721 2005-02-10 Havoc Pennington <hp@redhat.com>
3723 * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
3724 change to be _and_unlock instead of _unlocked
3726 * dbus/dbus-connection.c
3727 (_dbus_connection_send_preallocated_unlocked_no_update): rename to
3728 have no_update so we can find this bug quickly in future
3730 2005-02-10 Havoc Pennington <hp@redhat.com>
3732 * dbus/dbus-message-util.c (verify_test_message): tests for string
3735 * dbus/dbus-message.c (dbus_message_append_args_valist): add
3736 support for arrays of string/signature/path
3738 2005-02-10 Joe Shaw <joeshaw@novell.com>
3740 * dbus/dbus-connection.c
3741 (_dbus_connection_queue_received_message_link,
3742 _dbus_connection_message_sent): Add the path to
3744 (_dbus_connection_send_preallocated_and_unlock): Added. Calls
3745 _dbus_connection_send_preallocated_unlocked(), updated the
3746 dispatch status, and unlocks. Fixes a bug where certain
3747 situations (like a broken pipe) could cause a Disconnect message
3748 to not be sent, tricking the bus into thinking a service was still
3749 there when the process had quit.
3750 (_dbus_connection_send_preallocated): Call
3751 _dbus_connection_send_preallocated_and_unlock().
3752 (_dbus_connection_send_and_unlock): Added. Calls
3753 _dbus_connection_send_preallocated_and_unlock().
3754 (dbus_connection_send): Call _dbus_connection_send_and_unlock().
3755 (dbus_connection_send_with_reply): Update the dispatch status and
3758 * mono/Service.cs (~Service): Added. Removes the filter so that
3759 we don't get unmanaged code calling back into a GCed delegate.
3760 (RemoveFilter); Added.
3762 2005-02-09 John (J5) Palmieri <johnp@redhat.com>
3764 * dbus/dbus-message.c (dbus_message_iter_open_container):
3765 - Removed check for iterator type being an array because
3766 get_arg_type does not work with writer iterators
3767 - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
3769 2005-02-07 Havoc Pennington <hp@redhat.com>
3771 * doc/dbus-specification.xml: some more language cleanups; add
3772 stuff about how to deal with invalid protocol and extension
3773 points; add _ to allowed chars in auth commands; add EXTENSION_
3776 2005-02-06 Havoc Pennington <hp@redhat.com>
3778 * s/expected/required/ in a couple places for clarity
3780 2005-02-07 Colin Walters <walters@verbum.org>
3782 * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
3783 sender or proposed_recipient.
3785 2005-02-06 Havoc Pennington <hp@redhat.com>
3787 * dbus/dbus-message-factory.c (generate_special): more tests
3789 * dbus/dbus-marshal-validate.c (validate_body_helper): detect
3790 array length that exceeds the maximum
3792 2005-02-05 Havoc Pennington <hp@redhat.com>
3794 * dbus/dbus-message-factory.c (generate_special): more test cases,
3797 * dbus/dbus-marshal-validate.c (validate_body_helper): return the
3798 reason why a signature was invalid
3800 * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
3801 skip the length of the string before we look at it in validation
3803 * dbus/dbus-string-util.c (_dbus_string_test): add tests for
3806 * dbus/dbus-message.c (_dbus_message_loader_new): default
3807 max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
3809 2005-02-05 Havoc Pennington <hp@redhat.com>
3811 * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
3812 if the signature of a variant was empty
3813 (_dbus_validate_signature_with_reason): catch "(a)" (array inside
3814 struct with no element type)
3816 * dbus/dbus-message-factory.c (generate_uint32_changed): add more
3817 mangled messages to break things
3819 2005-02-04 Havoc Pennington <hp@redhat.com>
3821 * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
3822 g_quark_try_string() so it actually can return 0
3823 (dbus_g_proxy_connect_signal): ditto
3825 2005-02-04 Havoc Pennington <hp@redhat.com>
3827 * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
3829 (tristring_from_message): assert cleanly on null path/interface
3830 (should not be possible though I decided later)
3831 (dbus_g_proxy_dispose): move proxy manager unregistration here
3832 (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
3833 g_return_if_fail() checks
3835 2005-02-04 Havoc Pennington <hp@redhat.com>
3837 * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
3839 * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
3840 (with some minor changes)
3842 * doc/dbus-specification.xml: add deprecated attribute to
3843 introspection format
3845 2005-01-31 Havoc Pennington <hp@redhat.com>
3847 * glib/dbus-gproxy.c: rewrite how signals work again, this time I
3848 think it's sort of right
3850 2005-01-30 Havoc Pennington <hp@redhat.com>
3852 * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
3854 2005-01-30 Havoc Pennington <hp@redhat.com>
3856 * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
3858 * autogen.sh: change to autotools 1.9
3860 * glib/dbus-gproxy.c: completely change how signals work
3861 (dbus_g_proxy_add_signal): new function to specify signature of a
3863 (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
3864 and g_warning if the incoming message has the wrong signature.
3866 2005-01-30 Havoc Pennington <hp@redhat.com>
3868 * tools/dbus-names-model.c (have_names_notify): fix this
3870 * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
3871 up the string array handling a bit
3873 2005-01-30 Havoc Pennington <hp@redhat.com>
3875 * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
3876 (dbus_g_pending_call_cancel): new function
3878 * dbus/dbus-glib.h: move GType decls for connection/message here;
3879 * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
3880 here, just kind of rationalizing how we handle all that
3882 * tools/dbus-names-model.c: new file for a tree model listing the
3885 * tools/dbus-tree-view.c (model_new): use proper typing on the
3888 2005-01-30 Havoc Pennington <hp@redhat.com>
3890 * glib/dbus-gmain.c: add a custom GSource back that just checks
3891 whether the message queue has anything in it; otherwise, there are
3892 cases where we won't see messages in the queue since there was no
3893 IO visible to the glib main loop
3895 * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
3896 increase default message timeout to 25 seconds
3898 2005-01-30 Havoc Pennington <hp@redhat.com>
3900 * test/glib/test-profile.c (no_bus_stop_server): remove the
3901 warning about the g_warning that I just fixed
3903 * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
3904 custom source, seems to be a lot easier to understand and work
3907 2005-01-30 Havoc Pennington <hp@redhat.com>
3909 I think this main loop thing is conceptually broken, but here are
3910 some band aids. I'll maybe rewrite it in a minute.
3912 * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
3913 custom GSource, so don't pass it in; confusing
3914 (gsource_server_finalize, gsource_connection_finalize): add
3915 finalize handlers that remove all the watches.
3917 2005-01-30 Havoc Pennington <hp@redhat.com>
3919 * glib/dbus-gobject.c (introspect_properties): fix the XML
3922 * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
3923 which effectively detects the use of freed messages
3925 * glib/dbus-gobject.c (handle_introspect): modify and return the
3926 reply message instead of the incoming message
3928 * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
3929 gee, maybe it should SEND THE XML instead of just making a string
3930 and freeing it again ;-)
3932 * tools/dbus-print-message.c (print_message): improve printing of
3935 * configure.in: add debug-glib.service to the output
3937 2005-01-30 Havoc Pennington <hp@redhat.com>
3939 dbus-viewer introspected and displayed the bus driver
3941 * dbus/dbus-object-tree.c
3942 (object_tree_test_iteration): add tests for a handler registered on "/"
3944 * dbus/dbus-object-tree.c
3945 (_dbus_decompose_path): fix to handle path "/" properly
3946 (run_decompose_tests): add tests for path decomposition
3948 * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
3951 * glib/dbus-gobject.c (handle_introspect): fix quotes
3953 * test/glib/run-test.sh: support launching the bus, then running
3956 * test/glib/test-service-glib.c (main): put in a trivial gobject
3957 subclass and register it on the connection
3959 * bus/driver.c (bus_driver_handle_introspect): implement
3960 introspection of the bus driver service
3962 * dbus/dbus-protocol.h: add #defines for the XML namespace,
3963 identifiers, doctype decl
3965 * bus/driver.c (bus_driver_handle_get_service_owner): handle
3966 attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by
3967 returning the service unchanged.
3968 (bus_driver_handle_message): remove old check for reply_serial in
3969 method calls, now the message type deals with that
3970 (bus_driver_handle_message): handle NULL interface
3972 * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
3974 * glib/dbus-gloader-expat.c (description_load_from_string): allow
3977 * tools/dbus-viewer.c: add support for introspecting a service on
3980 * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
3981 (dbus_g_pending_call_unref): add
3983 2005-01-29 Havoc Pennington <hp@redhat.com>
3985 * tools/dbus-tree-view.c: add support for displaying properties.
3986 (run dbus-viewer with an introspect xml file as arg, then resize
3987 the window so the tree elements show up, not sure what that is)
3989 * glib/dbus-gobject.c (handle_introspect): return
3990 org.freedesktop.Properties and org.freedesktop.Introspectable
3991 interfaces when we are introspected.
3993 * doc/dbus-specification.xml: allow empty interface name when
3996 2005-01-29 Havoc Pennington <hp@redhat.com>
3998 * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
3999 though it uses glib, it could be extended for any binding in
4002 * glib/dbus-gobject.c (gobject_message_function): change to the
4003 new way properties work
4005 * dbus/dbus-protocol.h: add the new interfaces
4007 * doc/dbus-specification.xml: document the introspection format,
4008 Introspectable interface, and add an org.freedesktop.Properties
4011 * glib/dbus-gparser.c: add support for a <property> element
4013 * glib/dbus-gidl.c: add PropertyInfo
4015 * glib/dbus-gobject.c (handle_introspect): put the outermost
4016 <node> outside the signal and property descriptions.
4017 (introspect_properties): export properties as <property> rather
4018 than as method calls
4020 2005-01-28 Havoc Pennington <hp@redhat.com>
4022 * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
4023 related to authentication protocol
4025 2005-01-28 John (J5) Palmieri <johnp@redhat.com>
4027 * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
4028 - BUS_ACTIVATION -> BUS_STARTER
4029 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
4030 - class MessageIter (__init__): Added recursion checking
4031 so we throw a nice error instead of just disconnecting from the
4033 (get): Added arg_type parameter for recursion.
4034 Removed the nil type
4035 Added signiture type placeholder (not implemented)
4036 Added struct type placeholder (not implemented)
4037 Added varient type placeholder (not implemented)
4038 Commented out dict type for now
4039 (get_element_type): renamed from get_array_type
4040 (get_*): changed to use the dbus_message_iter_get_basic API
4041 (get_*_array): removed in favor of recursive get_array method
4042 (get_array): new recursive method which calls get to marshal
4043 the elements of the array
4044 (value_to_dbus_sig): New method returns the corrasponding
4045 dbus signiture to a python value
4046 (append): Comment out dict handling for now
4047 Handle lists with the new recursive API
4048 Comment out None handling for now
4049 (append_nil): removed
4050 (append_*): changed to use dbus_message_iter_append_basic API
4051 (append_*_array): removed in favor of recursive append_array
4053 (__str__): Make it easier to print out recursive iterators
4055 - class Message (__str__): moved type inspection to the
4056 MessageIter class' __str__ method
4057 (get_iter): Added an append parameter wich defaults to False
4058 If True use the new API's to create an append iterator
4060 * python/dbus.py: Update to use new bindings API
4061 - TYPE_ACTIVATION -> TYPE_STARTER
4062 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
4063 - class ActivationBus -> class StarterBus
4064 - class RemoteObject (__call__): get an append iterator
4065 - (_dispatch_dbus_method_call): get an append iterator
4066 - class Object (emit_signal): get an append iterator
4068 * python/examples/: Fixed up the examples to work with the new API
4070 2005-01-28 Joe Shaw <joeshaw@novell.com>
4072 * configure.in: Bump version up to 0.30.
4074 * HACKING: Add a release item to bump the version number up after
4077 2005-01-28 Havoc Pennington <hp@redhat.com>
4079 * doc/dbus-specification.xml: update to describe 16-bit types and
4082 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
4085 * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
4088 * dbus/dbus-marshal-recursive.c: implement
4090 2005-01-27 Havoc Pennington <hp@redhat.com>
4092 * dbus/dbus-arch-deps.h.in: add 16/32-bit types
4094 * configure.in: find the right type for 16 and 32 bit ints as well
4097 * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
4098 the 16-bit types so people don't have to stuff them in 32-bit or
4101 2005-01-27 Havoc Pennington <hp@redhat.com>
4103 * dbus/dbus-message.c: byteswap the message if you init an
4104 iterator to read/write from it
4106 * dbus/dbus-marshal-byteswap.c: new file implementing
4107 _dbus_marshal_byteswap()
4109 * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
4111 2005-01-26 Havoc Pennington <hp@redhat.com>
4113 * dbus/dbus-marshal-validate-util.c: break this out (and fix
4114 build, apparently - nobody noticed?)
4116 2005-01-26 Havoc Pennington <hp@redhat.com>
4118 * dbus/dbus-marshal-recursive.h: remove todo comment
4120 2005-01-25 Joe Shaw <joeshaw@novell.com>
4122 * Land the mono binding changes to conform to the new APIs.
4124 * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
4125 DBusType/Dict.cs, and DBusType/Nil.cs from the build.
4127 * mono/Arguments.cs (GetCodeAsString): Added. Returns the dbus
4128 type code as a string.
4129 (InitAppending): Rename dbus_message_append_iter_init() to
4130 dbus_message_iter_init_append().
4132 * mono/BusDriver.cs: Rename ServiceEventHandler to
4133 NameOwnerChangedHandler. Rename GetServiceOwner to GetOwner.
4134 Rename ServiceOwnerChanged to NameOwnerChanged.
4136 * mono/Connection.cs: Rename BaseService to UniqueName, and the
4139 * mono/Custom.cs: Removed. The CUSTOM type has been removed.
4141 * mono/Service.cs: Rename Exists to HasOwner, internally rename
4142 dbus_bus_acquire_service() to dbus_bus_request_name().
4144 * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
4145 of Type.UnderlyingSystemType to get the correct element type for
4147 (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
4148 dbus_message_get_{element|arg}_type() instead of
4149 dbus_message_iter_init_array_iterator().
4150 (Append): Replace dbus_message_iter_append_array() with
4151 dbus_message_iter_open_container() and
4152 dbus_message_iter_close_container().
4154 * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed. These
4155 types have been removed.
4157 * mono/DBusType/*.cs: Replace calls of
4158 dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
4159 but specify the type in the DllImport extern declaration. Ditto
4160 for dbus_message_iter_append_[type]() ->
4161 dbus_message_iter_append_basic().
4163 * mono/example/BusListener.cs: Update for ServiceEventHandler ->
4164 NameOwnerChangedHandler.
4166 2005-01-25 John (J5) Palmieri <johnp@redhat.com>
4168 * python/dbus_bindings.pyx.in: Rename of methods and bindings
4169 - get_base_service -> get_unique_name
4170 - bus_get_base_service -> bus_get_unique_name
4171 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
4172 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS
4173 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
4174 - bus_activate_service -> bus_start_service_by_name
4175 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
4176 - bus_acquire_service -> bus_request_name
4177 - dbus_bus_acquire_service -> dbus_bus_request_name
4178 - bus_service_exists -> bus_name_has_owner
4179 - dbus_bus_service_exists -> dbus_bus_name_has_owner
4181 * python/dbus.py: Rename of methods
4182 - activate_service -> start_service_by_name
4183 - bus_acquire_service -> bus_request_name
4184 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS
4185 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
4188 2005-01-24 Joe Shaw <joeshaw@novell.com>
4190 * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
4191 signature for the method that can't be found.
4193 * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
4194 the message has any arguments, we need to call
4195 _dbus_type_reader_get_current_type(), not
4196 _dbus_type_reader_has_next().
4198 2005-01-24 Havoc Pennington <hp@redhat.com>
4200 * dbus/dbus-message-factory.c: more testing of message validation
4202 * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
4205 2005-01-23 Havoc Pennington <hp@redhat.com>
4207 * dbus/dbus-message-factory.c, dbus/dbus-message-util.c:
4208 get this all working, not many tests in the framework yet though
4210 2005-01-22 Havoc Pennington <hp@redhat.com>
4212 * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
4213 tutorial, based on work from David Wheeler.
4215 2005-01-21 Havoc Pennington <hp@redhat.com>
4217 * dbus/dbus-bus.c: add more return_if_fail checks
4219 * dbus/dbus-message.c (load_message): have the "no validation"
4220 mode (have to edit the code to toggle the mode for now though)
4222 * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
4223 skips all validation; I want to use this at least for benchmark
4224 baseline, I'm not sure if it should be a publicly-available switch.
4226 2005-01-21 Havoc Pennington <hp@redhat.com>
4228 * glib/dbus-gmain.c: don't put the GLib bindings in the same
4229 toplevel doxygen group as the low-level API stuff
4231 * dbus/dbus.h: note that libdbus is the low-level API
4233 2005-01-20 Havoc Pennington <hp@redhat.com>
4235 * update-dbus-docs.sh: script to update docs on the web site, only
4236 works for me though. neener.
4238 2005-01-20 Havoc Pennington <hp@redhat.com>
4240 * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
4241 code can reveal bugs in it
4243 2005-01-20 Havoc Pennington <hp@redhat.com>
4245 * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
4246 select() version, patches from Tor Lillqvist
4248 2005-01-20 Havoc Pennington <hp@redhat.com>
4250 * doc/dbus-tutorial.xml: replace > with >
4252 * bus/services.c (bus_registry_acquire_service): validate the name
4253 and return a better error if it's no good.
4255 * doc/dbus-specification.xml: note NO_AUTO_START change
4257 * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
4258 from AUTO_START, we're toggling the default
4260 * bus/dispatch.c: adapt the tests to change of auto-start default
4262 2005-01-18 Havoc Pennington <hp@redhat.com>
4264 * rename dbus-daemon-1 to dbus-daemon throughout
4266 2005-01-18 Havoc Pennington <hp@redhat.com>
4268 * Throughout, grand renaming to strip out the use of "service",
4269 just say "name" instead (or "bus name" when ambiguous). Did not
4270 change the internal code of the message bus itself, only the
4271 programmer-facing API and messages.
4273 * doc/dbus-specification.xml: further update the message bus section
4275 * bus/config-parser.c (all_are_equiv): fix bug using freed string
4278 2005-01-17 Havoc Pennington <hp@redhat.com>
4280 * dbus/dbus-types.h: remove 16-bit types since we don't use them
4283 * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
4284 "invalid name character" not only non-ASCII
4286 * doc/dbus-specification.xml: further update spec, message bus
4287 parts are still out-of-date but the marshaling etc. stuff is now
4290 2005-01-17 Havoc Pennington <hp@redhat.com>
4292 * doc/dbus-specification.xml: partially update spec
4294 2005-01-17 Havoc Pennington <hp@redhat.com>
4296 * Throughout, align variant bodies according to the contained
4297 type, rather than always to 8. Should save a fair bit of space in
4300 * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
4301 fix handling of case where p == end
4303 * doc/TODO: remove the dbus_bool_t item and variant alignment items
4305 2005-01-17 Havoc Pennington <hp@redhat.com>
4307 * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
4309 * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
4310 of an 8-bit type. Now dbus_bool_t is the type to use whenever you
4311 are marshaling/unmarshaling a boolean.
4313 2005-01-16 Havoc Pennington <hp@redhat.com>
4315 This is about it on what can be disabled/deleted from libdbus
4316 easily, back below 150K anyhow. Deeper cuts are more work than
4317 just turning the code off as I've done here.
4319 * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
4320 signed int convenience funcs
4322 * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
4325 * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
4326 things out of libdbus
4328 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
4330 * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
4331 tests-enabled-only, though it should probably be deleted)
4333 * dbus/dbus-message-util.c: same stuff
4335 * dbus/dbus-auth-util.c: same stuff
4337 2005-01-16 Havoc Pennington <hp@redhat.com>
4339 * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
4341 * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
4342 way for stripping down dbus-userdb.c stuff included in libdbus.
4343 Rename _dbus_parse_uid for consistency.
4345 2005-01-16 Havoc Pennington <hp@redhat.com>
4347 * dbus/dbus-internals.c (_dbus_real_assert): print the function
4348 name the assertion failed in
4350 * dbus/dbus-internals.h (_dbus_return_if_fail)
4351 (_dbus_return_val_if_fail): assert that the name of the function
4352 containing the check doesn't start with '_', since we only want to
4353 use checks on public functions
4355 * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
4356 checks to assertions
4358 * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
4359 change checks to asserts for private function
4361 * dbus/dbus-message.c (_dbus_message_set_serial): checks
4362 to asserts for private function
4364 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
4365 broken assertion that was breaking make check
4366 (_dbus_type_reader_array_is_empty): remove this rather than fix
4367 it, was only used in assertions
4369 2005-01-16 Havoc Pennington <hp@redhat.com>
4371 * test/unused-code-gc.py: hacky script to find code that's used
4372 only by the bus (not libdbus) or used only by tests or not used at
4373 all. It has some false alarms, but looks like we can clean up a
4374 lot of size from libdbus.
4376 * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
4377 dbus/Makefile.am: initially move 10K of binary size out of libdbus
4379 2005-01-16 Havoc Pennington <hp@redhat.com>
4381 * Add and fix docs according to Doxygen warnings throughout
4384 * dbus/dbus-marshal-recursive.c
4385 (_dbus_type_reader_array_is_empty): change this to just call
4386 array_reader_get_array_len() and make it static
4388 * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
4390 (dbus_message_iter_init_append): rename from append_iter_init
4392 * dbus/dbus-marshal-recursive.c
4393 (_dbus_type_reader_get_element_type): rename from
4394 _dbus_type_reader_get_array_type
4396 2005-01-15 Havoc Pennington <hp@redhat.com>
4398 * test/glib/test-profile.c (with_bus_server_filter): fix crash
4400 * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
4401 when DBUS_DISABLE_ASSERT
4402 (_dbus_marshal_set_basic): be sure we align for the string length
4404 * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
4407 * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
4408 inline macro version
4409 (_dbus_string_set_byte): provide inline macro version
4411 2005-01-15 Havoc Pennington <hp@redhat.com>
4413 * Land the new message args API and type system.
4415 This patch is huge, but the public API change is not
4416 really large. The set of D-BUS types has changed somewhat,
4417 and the arg "getters" are more geared toward language bindings;
4418 they don't make a copy, etc.
4420 There are also some known issues. See these emails for details
4422 http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
4423 http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
4425 * dbus/dbus-marshal-*: all the new stuff
4427 * dbus/dbus-message.c: basically rewritten
4429 * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
4430 freed blocks to be all non-nul bytes so using freed memory is less
4431 likely to work right
4433 * dbus/dbus-internals.c (_dbus_test_oom_handling): add
4434 DBUS_FAIL_MALLOC=N environment variable, so you can do
4435 DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
4436 DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
4439 * qt/message.cpp: port to the new message args API
4440 (operator<<): use str.utf8() rather than str.unicode()
4441 (pretty sure this is right from the Qt docs?)
4443 * glib/dbus-gvalue.c: port to the new message args API
4445 * bus/dispatch.c, bus/driver.c: port to the new message args API
4447 * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
4448 "locked" flag to TRUE and align_offset to 0; I guess we never
4449 looked at these anyhow, but seems cleaner.
4451 * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
4452 move allocation padding macro to this header; use it to implement
4453 (_DBUS_STRING_STATIC): ability to declare a static string.
4455 * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
4456 change to return TRUE if the interface is not set.
4458 * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
4459 to dbus-marshal-validate.[hc]
4461 * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
4464 * dbus/Makefile.am: cut over from dbus-marshal.[hc]
4465 to dbus-marshal-*.[hc]
4467 * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
4468 function here from dbus-marshal.c
4470 2005-01-12 Joe Shaw <joeshaw@novell.com>
4472 * NEWS: Update for 0.23.
4474 * configure.in: Release 0.23.
4476 2005-01-12 Joe Shaw <joeshaw@novell.com>
4478 * mono/Makefile.am, mono/example/Makefile.am: Always build the
4479 dbus DLL with --debug. Clean up after the .mdb files this leaves
4482 * mono/doc/Makefile.am: Need to uninstall the docs on "make
4485 * mono/Arguments.cs (GetDBusTypeConstructor): If the type
4486 is an enum, get the enum's underlying type. Another mono
4489 2005-01-11 Joe Shaw <joeshaw@novell.com>
4491 Patch from Sjoerd Simons <sjoerd@luon.net>
4493 * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
4494 DESTDIR. It breaks stuff.
4496 2005-01-11 Joe Shaw <joeshaw@novell.com>
4498 Patch from Tambet Ingo <tambet@ximian.com>
4500 * mono/DBusType/Array.cs (Get): Get the underlying element type by
4501 calling type.GetElementType(). The code previously depended on
4502 broken Mono behavior, which was fixed in Mono 1.1.3.
4504 * mono/DBusType/Dict.cs (constructor): Fix the parameters for
4505 Activator.CreateInstance() so that the class's constructor is
4506 called with the right parameters.
4508 2005-01-11 Joe Shaw <joeshaw@novell.com>
4510 Patch from Timo Teräs <ext-timo.teras@nokia.com>
4512 * dbus/dbus-connection.c
4513 (_dbus_connection_queue_received_message_link): Call
4514 _dbus_connection_remove_timeout() instead of the _locked()
4515 variant, since it's always called from
4516 _dbus_connection_handle_watch(), which handles the locking.
4517 Removed the _locked() variant since it's no longer used.
4519 2005-01-03 Havoc Pennington <hp@redhat.com>
4521 * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
4524 2004-12-26 Havoc Pennington <hp@redhat.com>
4526 * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
4528 2005-01-03 Havoc Pennington <hp@redhat.com>
4530 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
4533 * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
4535 2005-01-02 Havoc Pennington <hp@redhat.com>
4537 * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
4539 2005-01-01 Havoc Pennington <hp@redhat.com>
4541 * configure.in: add -Wfloat-equal
4543 2005-01-01 Havoc Pennington <hp@redhat.com>
4545 * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro,
4546 for a variety of reasons '==' doesn't do this.
4548 2004-12-31 Havoc Pennington <hp@redhat.com>
4550 * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
4551 I keep wishing I had
4553 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
4555 * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
4557 2004-12-30 John (J5) Palmieri <johnp@redhat.com>
4559 * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
4560 and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
4561 dbus-protocol.h. Because they are defines and not enums they are not
4564 2004-12-26 John (J5) Palmieri <johnp@redhat.com>
4566 * python/dbus_bindings.pyx.in (bus_activate_service): Bind
4567 dbus_bus_activate_service
4569 * python/dbus.py (Bus.activate_service): activate a service on the
4572 2004-12-24 Havoc Pennington <hp@redhat.com>
4574 * test/decode-gcov.c: change to use .gcno and .gcda files, but the
4575 file format has also changed and I haven't adapted to that yet
4577 * Makefile.am: load .gcno files from latest gcc
4579 2004-12-23 John (J5) Palmieri <johnp@redhat.com>
4580 * Patch from Rob Taylor <robtaylor@fastmail.fm>
4582 * python/dbus_bindings.pyx.in (bus_get_unix_user): New
4585 * python/dbus.py (get_unix_user): Added binding to
4586 call dbus_bindings.bus_get_unix_user
4588 * python/extract.py: Modified the proto_pat regex to
4589 handle unsigned long
4591 2004-12-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
4593 * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
4594 better POSIX compliance.
4596 2004-12-19 Havoc Pennington <hp@redhat.com>
4598 * dbus/dbus-string.c (_dbus_string_insert_4_aligned)
4599 (_dbus_string_insert_8_aligned): new functions
4601 * dbus/dbus-string.c (_dbus_string_alloc_space): new function
4603 2004-12-18 Havoc Pennington <hp@redhat.com>
4605 * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
4608 * dbus/dbus-message.c: fix a comment, and add a still-unused
4609 not-implemented function
4611 * dbus/dbus-marshal.h: fix comment
4613 * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
4615 2004-12-17 Joe Shaw <joeshaw@novell.com>
4617 * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
4618 mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
4619 mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
4620 Type.UnderlyingSystemType to get the actual system type
4621 underneath. This code previously depended on the broken Mono
4622 behavior, which was fixed in 1.1.3.
4624 2004-11-27 Havoc Pennington <hp@redhat.com>
4626 * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
4628 (_dbus_string_get_const_data): inline when asserts are disabled
4630 * dbus/dbus-message.c: record the _dbus_current_generation of
4631 creation so we can complain if dbus_shutdown() is used improperly.
4632 Do this only if checks are enabled.
4634 * dbus/dbus-connection.c: ditto
4636 2004-11-26 Havoc Pennington <hp@redhat.com>
4638 * test/glib/test-profile.c: add with_bus mode to profile echoes
4639 that go through the bus.
4641 * test/glib/run-test.sh: add ability to run test-profile
4643 * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
4646 2004-11-26 Havoc Pennington <hp@redhat.com>
4648 * test/glib/test-profile.c: clean up how the fake_malloc_overhead
4649 thing was implemented
4651 2004-11-26 Havoc Pennington <hp@redhat.com>
4653 * test/glib/test-profile.c: tweak a bit, add support for some
4654 made-up minimal malloc overhead with plain sockets, since in
4655 real life some sort of buffers are unavoidable thus we could
4656 count them in the theoretical best case
4658 2004-11-26 Havoc Pennington <hp@redhat.com>
4660 * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
4661 where I was trying to cache one too many messages
4663 2004-11-26 Havoc Pennington <hp@redhat.com>
4665 * dbus/dbus-message.c: reimplement message cache as an array which
4666 makes the cache about twice as fast and saves maybe 1.5% overall
4668 2004-11-26 Havoc Pennington <hp@redhat.com>
4670 * dbus/dbus-threads.c (init_global_locks): forgot to put the
4671 message cache lock here
4673 2004-11-26 Havoc Pennington <hp@redhat.com>
4675 * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
4676 the "char byte_order" next to each other to save 4 bytes
4677 (dbus_message_new_empty_header): reduce preallocation, since the
4678 message cache should achieve a similar effect
4679 (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
4680 message cache that keeps a few DBusMessage around in a pool,
4681 another 8% speedup or so.
4683 * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
4685 2004-11-25 Havoc Pennington <hp@redhat.com>
4687 * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
4688 to write, without reading or blocking, try it before the poll()
4689 and skip the poll() if nothing remains to write. This is about a
4690 3% speedup in the echo client/server
4692 2004-11-25 Havoc Pennington <hp@redhat.com>
4694 The primary change here is to always write() once before adding
4695 the write watch, which gives us about a 10% performance increase.
4697 * dbus/dbus-transport-unix.c: a number of modifications to cope
4698 with removing messages_pending
4699 (check_write_watch): properly handle
4700 DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
4701 messages_pending stuff
4702 (check_read_watch): properly handle WAITING_FOR_MEMORY and
4704 (unix_handle_watch): after writing, see if the write watch can be
4706 (unix_do_iteration): assert that write_watch/read_watch are
4707 non-NULL rather than testing that they aren't, since they
4708 aren't allowed to be NULL. check_write_watch() at the end so
4709 we add the watch if we did not finish writing (e.g. got EAGAIN)
4711 * dbus/dbus-transport-protected.h: remove messages_pending call,
4712 since it resulted in too much inefficient watch adding/removing;
4713 instead we now require that the transport user does an iteration
4714 after queueing outgoing messages, and after trying the first
4715 write() we add a write watch if we got EAGAIN or exceeded our
4716 max bytes to write per iteration setting
4718 * dbus/dbus-string.c (_dbus_string_validate_signature): add this
4721 * dbus/dbus-server-unix.c (unix_finalize): the socket name was
4722 freed and then accessed, valgrind flagged this bug, fix it
4724 * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
4725 as the last valid field plus 1, where really it is equal to the
4726 last valid field. Corrects some message corruption issues.
4728 * dbus/dbus-mainloop.c: verbosity changes
4730 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
4731 instead of aborting in one of the test codepaths
4733 * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
4734 caused not printing the pid ever again if a verbose was missing
4735 the newline at the end
4736 (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
4738 * dbus/dbus-connection.c: verbosity changes;
4739 (dbus_connection_has_messages_to_send): new function
4740 (_dbus_connection_message_sent): no longer call transport->messages_pending
4741 (_dbus_connection_send_preallocated_unlocked): do one iteration to
4742 try to write() immediately, so we can avoid the write watch. This
4743 is the core purpose of this patchset
4744 (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
4745 dump the outgoing message queue, so nobody will get confused
4746 trying to send them or thinking stuff is pending to be sent
4748 * bus/test.c: verbosity changes
4750 * bus/driver.c: verbosity/assertion changes
4752 * bus/dispatch.c: a bunch of little tweaks to get it working again
4753 because this patchset changes when/where you need to block.
4755 2004-11-23 Havoc Pennington <hp@redhat.com>
4757 * test/glib/test-profile.c: modify to accept a plain_sockets
4758 argument in which case it will bench plain sockets instead of
4759 libdbus, for comparison purposes.
4761 2004-11-22 Havoc Pennington <hp@redhat.com>
4763 * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
4764 threads for more time, so sysprof can get a grip on it.
4766 * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
4769 2004-11-13 Havoc Pennington <hp@redhat.com>
4771 * test/glib/test-profile.c: fix this thing up a bit
4773 * dbus/dbus-message.c (dbus_message_new_empty_header): increase
4774 preallocation sizes by a fair bit; not sure if this will be an
4775 overall performance win or not, but it does reduce reallocs.
4777 * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
4778 the test hack that forced constant realloc if asserts are
4779 disabled, so we can profile sanely. Sprinkle in some
4780 _DBUS_UNLIKELY() which are probably pointless, but before I
4781 noticed the real performance problem I put them in.
4782 (_dbus_string_validate_utf8): micro-optimize this thing a little
4783 bit, though callgrind says it didn't help; then special-case
4784 ascii, which did help a lot; then be sure we detect nul bytes as
4785 invalid, which is a bugfix.
4786 (align_length_then_lengthen): add some more _DBUS_UNLIKELY
4787 superstition; use memset to nul the padding instead of a manual
4789 (_dbus_string_get_length): inline this as a
4790 macro; it showed up in the profile because it's used for loop
4793 2004-11-10 Colin Walters <walters@verbum.org>
4795 * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
4798 2004-11-09 Colin Walters <walters@verbum.org>
4800 * dbus/dbus-string.c (_dbus_string_get_length): New
4801 function, writes DBusString to C buffer.
4803 * dbus/dbus-string.h: Prototype it.
4805 * dbus/dbus-message.c (dbus_message_type_to_string): New
4806 function, converts message type into C string.
4808 * dbus/dbus-message.h: Prototype it.
4810 * bus/selinux.c (bus_selinux_check): Take source pid,
4811 target pid, and audit data. Pass audit data to
4813 (log_audit_callback): New function, appends extra
4815 (bus_selinux_allows_acquire_service): Also take
4816 service name, add it to audit data.
4817 (bus_selinux_allows_send): Also take message
4818 type, interface, method member, error name,
4819 and destination, and add them to audit data.
4820 (log_cb): Initialize func_audit.
4822 * bus/selinux.h (bus_selinux_allows_acquire_service)
4823 (bus_selinux_allows_send): Update prototypes
4825 * bus/services.c (bus_registry_acquire_service): Pass
4826 service name to bus_selinux_allows_acquire_service.
4828 * bus/bus.c (bus_context_check_security_policy): Pass
4829 additional audit data. Move assignment of dest
4832 2004-11-07 Colin Walters <walters@verbum.org>
4834 * dbus/dbus-transport-unix.c (do_authentication): Always
4835 initialize auth_completed.
4837 2004-11-07 Colin Walters <walters@verbum.org>
4839 * bus/bus.c (load_config): Break into three
4840 separate functions: process_config_first_time_only,
4841 process_config_every_time, and process_config_postinit.
4842 (process_config_every_time): Move call of
4843 bus_registry_set_service_context_table into
4844 process_config_postinit.
4845 (process_config_postinit): New function, does
4846 any processing that needs to happen late
4847 in initialization (and also on reload).
4848 (bus_context_new): Instead of calling load_config,
4849 open config parser here and call process_config_first_time_only
4850 and process_config_every_time directly. Later, after
4851 we have forked but before changing UID,
4852 invoke bus_selinux_full_init, and then call
4853 process_config_postinit.
4854 (bus_context_reload_config): As in bus_context_new,
4855 load parse file inside here, and call process_config_every_time
4856 and process_config_postinit.
4858 * bus/services.h, bus/services.c
4859 (bus_registry_set_service_context_table): Rename
4860 from bus_registry_set_sid_table. Take string hash from config
4861 parser, and convert them here into SIDs.
4863 * bus/config-parser.c (struct BusConfigParser): Have
4864 config parser only store a mapping of service->context
4866 (merge_service_context_hash): New function.
4867 (merge_included): Merge context string hashes instead
4868 of using bus_selinux_id_table_union.
4869 (bus_config_parser_new): Don't use bus_selinux_id_table_new;
4870 simply create a new string hash.
4871 (bus_config_parser_unref): Unref it.
4872 (start_selinux_child): Simply insert strings into hash,
4873 don't call bus_selinux_id_table_copy_over.
4875 * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
4876 (bus_selinux_id_table_copy_over): Delete.
4878 2004-11-03 Colin Walters <walters@verbum.org>
4880 * bus/selinux.c (bus_selinux_pre_init): Kill some unused
4883 2004-11-03 Colin Walters <walters@verbum.org>
4885 * bus/test-main.c (test_pre_hook): Fix test logic,
4886 thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
4888 2004-11-02 Colin Walters <walters@redhat.com>
4890 * bus/selinux.c (bus_selinux_init): Split into two functions,
4891 bus_selinux_pre_init and bus_selinux_post_init.
4892 (bus_selinux_pre_init): Just determine whether SELinux is
4894 (bus_selinux_post_init): Do everything else.
4896 * bus/main.c (main): Call bus_selinux_pre_init before parsing
4897 config file, and bus_selinux_post_init after. This ensures that
4898 we don't lose the policyreload notification thread that
4899 bus_selinux_init created before forking previously.
4901 * bus/test-main.c (test_pre_hook): Update for split.
4903 2004-10-31 Owen Fraser-Green <owen@discobabe.net>
4905 Patch from Johan Fischer <linux@fischaz.com>
4907 * mono/doc/Makefile.am (install-data-local): Added directory
4910 2004-10-29 Colin Walters <walters@redhat.com>
4912 * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
4913 parameter for fd to write pid to.
4915 * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
4917 * bus/bus.c (bus_context_new): Pass print_pid_fd
4918 to _dbus_become_daemon (bug #1720)
4920 2004-10-29 Colin Walters <walters@redhat.com>
4922 Patch from Ed Catmur <ed@catmur.co.uk>
4924 * mono/doc/Makefile.am (install-data-local): Handle
4927 2004-10-29 Colin Walters <walters@redhat.com>
4929 * bus/.cvsignore, qt/.cvsignore: Update.
4931 2004-10-29 Colin Walters <walters@redhat.com>
4933 Patch from Kristof Vansant <de_lupus@pandora.be>
4935 * configure.in: Detect Slackware.
4936 * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
4937 * bus/rc.messagebus.in: New file.
4939 2004-10-29 Colin Walters <walters@redhat.com>
4941 * tools/dbus-monitor.c (filter_func): Return
4942 DBUS_HANDLER_RESULT_HANDLED in filter function
4944 http://freedesktop.org/pipermail/dbus/2004-August/001433.html
4946 2004-10-29 Colin Walters <walters@redhat.com>
4948 Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
4950 * bus/services.c (bus_registry_acquire_service):
4951 Correctly retrieve service name from DBusString
4954 2004-10-29 Colin Walters <walters@redhat.com>
4956 * dbus/dbus-glib.h: Update documentation to not
4957 refer to internal APIs.
4959 2004-10-27 Joe Shaw <joeshaw@novell.com>
4961 * mono/Arguments.cs (GetDBusTypeConstructor):
4962 type.UnderlyingSystemType will return "System.Byte" if you do it
4963 on "byte[]", which is not what we want. So check the type.IsArray
4964 property and use System.Array instead.
4966 2004-10-25 John (J5) Palmieri <johnp@redhat.com>
4968 * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
4969 the DBusUserInfo structure since this is passed into the function.
4970 This would cause a double free when the function that allocated
4971 the structure would try to free it when an error occured.
4973 * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
4974 use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
4975 for service activation to avoid 32bit/64bit parallel install issues
4977 2004-10-21 Colin Walters <walters@verbum.org>
4979 * AUTHORS: Fix my email address, the @gnu.org one
4980 has been bouncing for some time. Also add J5.
4982 2004-10-21 Colin Walters <walters@verbum.org>
4984 * dbus/dbus-transport-unix.c (do_authentication): Return
4985 authentication status to callers.
4986 (unix_handle_watch): If we completed authentication this round,
4987 don't do another read. Instead wait until the next iteration,
4988 after we've read any pending data in the auth buffer.
4989 (unix_do_iteration): Ditto.
4990 (unix_handle_watch): Updated for new do_authentication prototype.
4992 2004-10-18 Colin Walters <walters@verbum.org>
4994 * bus/selinux.c (bus_selinux_enabled): Handle
4995 --disable-selinux case.
4997 2004-10-18 Colin Walters <walters@verbum.org>
4999 * bus/selinux.h: Add bus_selinux_enabled.
5001 * bus/selinux.c (bus_selinux_enabled): Implement it.
5003 * bus/config-parser.c (struct include): Add
5004 if_selinux_enabled member.
5005 (start_busconfig_child): Parse if_selinux_enabled
5006 attribute for include.
5007 (bus_config_parser_content): Handle it.
5009 * bus/session.conf.in, bus/system.conf.in: Add
5010 inclusion of context mapping to default config files;
5011 conditional on SELinux being enabled.
5013 * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
5015 * test/data/invalid-config-files/badselinux-1.conf,
5016 test/data/invalid-config-files/badselinux-2.conf:
5017 Test files for bad syntax.
5019 2004-10-17 Colin Walters <walters@verbum.org>
5021 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
5022 (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
5023 format specifier mismatches.
5025 2004-10-07 Olivier Andrieu <oliv__a@users.sourceforge.net>
5027 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
5030 * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
5031 pointer (bug #1540, Leonardo Boiko).
5033 2004-09-28 Jon Trowbridge <trow@ximian.com>
5035 * mono/BusDriver.cs: Changed BusDriver struct to remove
5036 the ServiceCreated and ServiceDeleted events and replace them
5037 with the new ServiceOwnerChanged event.
5039 * mono/example/BusListener.cs: Added a new example program,
5040 which listens for and reports any ServiceOwnerChanged events
5043 * mono/example/Makefile.am (DESTDIR): Build changes for the
5044 new BusListener.cs example.
5046 2004-09-27 Olivier Andrieu <oliv__a@users.sourceforge.net>
5048 * bus/signals.c (bus_match_rule_parse): validate the components of
5049 match rules (bug #1439).
5051 * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
5053 2004-09-24 Olivier Andrieu <oliv__a@users.sourceforge.net>
5055 * doc/dbus-specification.xml: document ServiceOwnerChanged
5058 * bus/driver.c, bus/driver.h, bus/services.c: Use
5059 ServiceOwnerChanged signal instead of ServiceCreated and
5062 * bus/dispatch.c: update testcase for the new signal.
5064 2004-09-20 Jon Trowbridge <trow@ximian.com>
5066 Patch from Nat Friedman <nat@novell.com>
5068 * mono/Makefile.am: A number of small build fixes to allow "make
5069 distcheck" to succeed.
5071 * mono/example/Makefile.am: "make distcheck" fixes.
5073 * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
5076 * test/Makefile.am: "make distcheck" fixes.
5078 2004-09-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
5080 * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
5082 * doc/busconfig.dtd: update the DTD for the at_console attribute.
5084 * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
5085 messages after the first one (bug #1389).
5087 * bus/dispatch.c (check_double_hello_message): add a test case for
5088 the double hello message bug.
5089 (check_existent_service_activation): fix check of spawning error.
5091 2004-09-16 David Zeuthen <david@fubar.dk>
5093 * python/dbus_bindings.pyx.in: Add support for int64 and uint64
5095 2004-09-12 David Zeuthen <david@fubar.dk>
5097 Patch from Kay Sievers <kay.sievers@vrfy.org>
5099 * bus/bus.c (bus_context_new):
5101 * bus/main.c (usage)
5103 Add commandline option --nofork to override configuration file
5106 2004-09-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
5108 * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
5109 compilers don't like it (bug #974).
5111 2004-09-04 Harald Fernengel <harry@kdevelop.org>
5113 * qt/connection.*: Applied patch by Jérôme Lodewyck
5114 <lodewyck@clipper.ens.fr> to integrate an existing
5115 connection into the Qt eventloop
5117 2004-08-30 Jon Trowbridge <trow@ximian.com>
5119 * mono/BusDriver.cs: Added. This is a class for interacting with
5120 the org.freedesktop.DBus service.
5122 * mono/Message.cs: Added a mechanism to expose the message that is
5123 currently being dispatched via the static Message.Current
5124 property. Added Message.Sender and Message.Destination
5127 * mono/Handler.cs: Expose the dispatched message via
5128 Message.Current when handling method calls.
5130 * mono/Service.cs: Expose the dispatched message via
5131 Message.Current when handling signal emissions.
5133 * mono/Connection.cs: Bind dbus_bus_get_base_service via the
5134 Connection.BaseService property.
5136 2004-08-28 Havoc Pennington <hp@redhat.com>
5138 * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
5140 More fixes from Steve Grubb
5142 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
5143 (_dbus_listen_tcp_socket): fix fd leak
5145 * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
5146 EINTR to a bit lower in the code
5148 2004-08-26 Jon Trowbridge <trow@ximian.com>
5150 * bus/driver.c (bus_driver_handle_service_exists): Respond with
5151 TRUE if we are inquiring about the existence of the built-in
5152 org.freedesktop.DBus service.
5154 2004-08-25 John Palmieri <johnp@redhat.com>
5155 * bus/config-parser.c:
5156 (struct PolicyType): Add POLICY_CONSOLE
5157 (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
5158 (start_busconfig_child): Sets up console element when
5159 <policy at_console=""> is encountered in a policy file
5160 (append_rule_from_element): Convert console elements to console
5164 (bus_policy_create_client_policy): Add console rules to the client
5165 policy based on if the client is at the console
5166 (bus_policy_append_console_rule): New function for adding a
5167 console rule to a policy
5168 (bus_policy_merge): Handle console rule merging
5170 * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
5171 where we check for console user files
5173 * dbus/dbus-sysdeps.c:
5174 (_dbus_file_exists): New function which checks if the given
5176 (_dbus_user_at_console): New function which does the system
5177 specific process of checking if the user is at the console
5179 * dbus/dbus-userdb.c:
5180 (_dbus_is_console_user): New function converts a UID to user name
5181 and then calls the system specific _dbus_user_at_console to
5182 see if the user is at the console and therefor a console user
5184 2004-08-25 Olivier Andrieu <oliv__a@users.sourceforge.net>
5186 * bus/config-parser.c (set_limit):
5187 * bus/dbus-daemon-1.1.in:
5188 * test/data/valid-config-files/many-rules.conf: set the
5189 max_match_rules_per_connection limt from the config file.
5191 * doc/busconfig.dtd: update the DTD.
5193 * bus/driver.c: remove some unused variables.
5195 2004-08-24 Mikael Hallendal <micke@imendio.com>
5197 * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since
5198 it's been replaced by dbus_g_bus_get
5200 2004-08-23 Colin Walters <walters@redhat.com>
5202 Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
5204 * bus/selinux.h: Prototype bus_selinux_get_policy_root.
5206 * bus/selinux.c: Create a thread for policy reload notification.
5207 (bus_selinux_get_policy_root): Implement.
5209 * bus/config-parser.c (start_busconfig_child)
5210 (bus_config_parser_content): Support SELinux-root relative
5213 * configure.in <HAVE_SELINUX>: Add -lpthread.
5215 * bus/test-main.c (test_pre_hook, test_post_hook): New.
5216 (test_post_hook): Move memory checking into here.
5217 (test_pre_hook, test_post_hook): Move SELinux checks in
5218 here, but conditional on a DBUS_TEST_SELINUX environment
5219 variable. Unfortunately we can't run the SELinux checks
5220 as a normal user, since they won't have any permissions
5221 for /selinux. So this will have to be tested manually
5222 for now, until we have virtualization for most of
5225 2004-08-23 Havoc Pennington <hp@redhat.com>
5227 * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
5228 drop supplementary groups, suggested by Steve Grubb
5230 2004-08-20 Colin Walters <walters@redhat.com>
5232 * bus/config-parser.c (start_busconfig_child): Remove some unused
5235 * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
5238 2004-08-17 Joe Shaw <joeshaw@novell.com>
5240 * configure.in: If --enable-mono is passed in, if we can't find
5243 * mono/Makefile.am: Use /gacutil to install assemblies into the
5246 2004-08-12 Havoc Pennington <hp@redhat.com>
5248 * NEWS: update for 0.22
5250 * configure.in: release 0.22
5252 2004-08-11 Colin Walters <walters@redhat.com>
5254 * tools/dbus-send.c (main, usage): Add --reply-timeout
5257 2004-08-10 Olivier Andrieu <oliv__a@users.sourceforge.net>
5259 * bus/bus.c (process_config_first_time_only): get rid of an unused
5260 DBusError that was causing a memoy leak (bug #989).
5262 * dbus/dbus-keyring.c, dbus/dbus-message.c:
5263 fix compilation on Solaris/Forte C (bug #974)
5265 * bus/main.c (main): plug two minuscule memleaks.
5267 2004-08-10 Havoc Pennington <hp@redhat.com>
5269 * doc/dbus-tutorial.xml: add some more info on GLib bindings
5271 2004-08-09 Havoc Pennington <hp@redhat.com>
5273 * COPYING: switch to Academic Free License version 2.1 instead of
5274 2.0, to resolve complaints about patent termination clause.
5276 2004-07-31 John (J5) Palmieri <johnp@redhat.com>
5278 * README: added documentation for the --enable-python
5281 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
5283 * bus/config-parser.c (bus_config_parser_new): fix an invalid
5284 _unref in the SELinux support.
5286 * doc/busconfig.dtd: update DTD for SELinux support.
5288 * bus/config-loader-libxml.c: fix error handler and parser
5289 initialisation/cleanup. OOM test now works with libxml2 HEAD.
5291 * configure.in: remove the warning about libxml2.
5293 * dbus/dbus-bus.c: silence doxygen warning.
5295 2004-07-31 Colin Walters <walters@redhat.com>
5297 * configure.in: Move #error in SELinux check to its own line.
5299 2004-07-31 Olivier Andrieu <oliv__a@users.sourceforge.net>
5301 * dbus/dbus-internals.h (_DBUS_SET_OOM):
5302 * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
5305 * bus/dispatch.c (check_send_exit_to_service): fix the test case,
5306 broken by the change in the _SET_OOM macros.
5308 2004-07-31 Colin Walters <walters@redhat.com>
5310 * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
5313 2004-07-31 Colin Walters <walters@redhat.com>
5315 * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
5316 to correctly detect DBUS__ACQUIRE_SVC. Also add an
5319 2004-07-24 Havoc Pennington <hp@redhat.com>
5321 SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
5323 * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
5326 * configure.in: add --enable-selinux
5328 * bus/policy.c (bus_policy_merge): add FIXME to a comment
5330 * bus/main.c (main): initialize and shut down selinux
5332 * bus/connection.c: store SELinux ID on each connection, to avoid
5333 repeated getting of the string context and converting it into
5336 * bus/bus.c (bus_context_get_policy): new accessor, though it
5338 (bus_context_check_security_policy): check whether the security
5339 context of sender connection can send to the security context of
5340 recipient connection
5342 * bus/config-parser.c: add parsing for <selinux> and <associate>
5344 * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
5345 implement dbus_connection_get_unix_fd()
5347 * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
5348 function, used by the selinux stuff
5350 2004-07-29 Olivier Andrieu <oliv__a@users.sourceforge.net>
5352 * bus/config-loader-libxml.c: complete the implementation of
5353 libxml backend for config file loader. Doesn't work with full OOM
5356 * configure.in: change error when selecting libxml into a warning.
5358 * test/data/invalid-config-files: add two non-well-formed XML
5361 * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
5363 * dbus/dbus-transport-unix.c (unix_handle_watch): do not
5364 disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
5365 be necessary to read all the buffer. (bug #894)
5367 * bus/activation.c (bus_activation_activate_service): fix a
5368 potential assertion failure (bug #896). Small optimization in the
5369 case of auto-activation messages.
5371 * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
5372 add test case for byte-through-vararg bug (#901). patch by Kimmo
5375 2004-07-28 Anders Carlsson <andersca@gnome.org>
5378 * python/dbus_bindings.pyx.in:
5379 Add dbus.init_gthreads (), allow emit_signal to pass
5380 arguments to the signal.
5382 2004-07-24 Havoc Pennington <hp@redhat.com>
5384 * AUTHORS: add some people, not really comprehensively, let me
5385 know if I missed you
5387 2004-07-24 Havoc Pennington <hp@redhat.com>
5389 * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
5392 * test/Makefile.am (DIST_SUBDIRS): here also
5394 2004-07-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
5396 * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
5397 breaking build on Solaris, reported by Farhad Saberi on the ML.
5399 * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
5400 va_arg invocation to account for integer promotion in the case of
5401 DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
5403 * bus/services.c (bus_service_remove_owner): fix bug #902, use
5404 _dbus_list_get_first_link, not _dbus_list_get_first.
5406 * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
5408 * dbus/dbus-object-tree.c (free_subtree_recurse): always null
5409 handler functions so that the asserts in _dbus_object_subtree_unref
5412 * dbus/dbus-transport-unix.c (do_reading):
5413 _dbus_transport_queue_messages return value is of type
5414 dbus_bool_t, not DBusDispatchStatus.
5416 2004-07-19 David Zeuthen <david@fubar.dk>
5418 * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
5421 (check_get_connection_unix_user): Debug says GetProperty; but the
5422 method is called GetConnectionUnixUser
5423 (check_get_connection_unix_process_id): New function
5424 (bus_dispatch_test): Actually call check_get_connection_unix_user();
5425 also call check_get_connection_unix_process_id()
5428 (bus_driver_handle_get_connection_unix_process_id): New function,
5429 handles GetConnectionUnixProcessID on the org.freedesktop.DBus
5433 (handle_server_data_external_mech): Set pid from the credentials
5434 obtained from the socket
5436 * dbus/dbus-connection.c:
5437 (dbus_connection_get_unix_process_id): New function
5439 * dbus/dbus-connection.h:
5440 Add prototype for dbus_connection_get_unix_process_id
5442 * dbus/dbus-transport.c:
5443 (_dbus_transport_get_unix_process_id): New function
5445 * dbus/dbus-transport.h:
5446 Add prototype for _dbus_transport_get_unix_process_id
5448 2004-07-19 Olivier Andrieu <oliv__a@users.sourceforge.net>
5450 * dbus/dbus-message.c: Message counter fix, patch by Christian
5451 Hammond <chipx86@gnupdate.org>
5453 2004-07-18 Seth Nickell <seth@gnome.org>
5456 * python/dbus_bindings.pyx.in:
5457 * python/tests/test-client.py:
5459 Add dbus.ByteArray and dbus_bindings.ByteArray
5460 types so that byte streams can be passed back.
5462 Give jdahlin the heaps of credit that are so
5465 2004-07-12 Seth Nickell <seth@gnome.org>
5469 Add message argument to the default object_method_handler
5472 * python/dbus_bindings.pyx.in:
5474 Automatically return NIL when passed an empty list
5475 (we can't pass back a list since lists are typed
5476 and we don't have any idea what type the the client
5477 intended the list to be... :-( )
5479 2004-07-10 Seth Nickell <seth@gnome.org>
5481 * python/examples/Makefile.am:
5483 Fix distcheck breakage caused by new examples.
5485 2004-07-10 Seth Nickell <seth@gnome.org>
5489 Add "message" argument to service-side dbus.Object
5490 methods. This will break existing services written
5491 using the python bindings, but will allow extraction
5492 of all the message information (e.g. who its from).
5494 Add improved "object oriented" signal handling/emission.
5496 * python/examples/example-service.py:
5500 * python/examples/example-signal-emitter.py:
5501 * python/examples/example-signal-recipient.py:
5503 Two new examples that show how to emit and receive
5504 signals using the new APIs.
5506 * python/examples/example-signals.py:
5507 * python/examples/gconf-proxy-service.py:
5508 * python/examples/gconf-proxy-service2.py:
5510 Add "message" argument to service methods.
5512 2004-06-28 Kay Sievers <kay.sievers@vrfy.org>
5514 * bus/driver.c (bus_driver_handle_get_connection_unix_user)
5515 * dbus/bus.c (dbus_bus_get_unix_user)
5516 * doc/dbus-specification.xml: implement GetConnectionUnixUser
5517 method of org.freedesktop.DBus interface.
5519 * bus/dispatch.c: test case
5521 2004-06-23 John (J5) Palmieri <johnp@redhat.com>
5523 * python/Makefile.am: switched include directory from glib/ to dbus/
5524 since dbus-glib.h moved
5526 2004-06-22 Olivier Andrieu <oliv__a@users.sourceforge.net>
5528 * configure.in: prevent building the gcj stuff and libxml loader
5529 since they are broken.
5531 2004-06-20 Havoc Pennington <hp@redhat.com>
5533 * dbus/dbus-glib-error-enum.h: autogenerate the GError enum
5534 codes from the dbus error names
5536 * glib/dbus-glib.h: move to subdir dbus/ since it's included
5537 as dbus/dbus-glib.h and that breakage is now visible due to
5538 including dbus/dbus-glib.h in dbus-glib-lowlevel.h
5540 * glib/dbus-glib.h: s/gproxy/g_proxy/
5542 * dbus/dbus-shared.h: new header to hold stuff shared with
5545 * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
5548 * glib/dbus-glib.h (dbus_set_g_error): move to
5549 dbus-glib-lowlevel.h
5551 * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
5552 of stuff to enable this
5554 * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
5556 * a bunch of other changes with the same basic "separate glib
5557 bindings from dbus.h" theme
5559 2004-06-10 Owen Fraser-Green <owen@discobabe.net>
5561 * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
5563 * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
5565 2004-06-09 Olivier Andrieu <oliv__a@users.sourceforge.net>
5567 * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
5568 the reply value of the ServiceExists message.
5570 2004-06-07 John (J5) Palmieri <johnp@redhat.com>
5572 * python/dbus_bindings.pyx.in: No longer need to parse path
5573 elements and pass them as arrays of strings. The C API now
5574 accepts plain path strings.
5575 (_build_parsed_path): removed
5577 2004-06-07 Havoc Pennington <hp@redhat.com>
5579 * doc/TODO: remove auto-activation item since it's done; sort
5580 items by importance/milestone
5582 2004-06-07 Havoc Pennington <hp@redhat.com>
5584 * dbus/dbus-message-builder.c (_dbus_message_data_load): append
5585 random signature when using REQUIRED_FIELDS (this hack won't work
5588 * dbus/dbus-message.c: change the signature to be a header field,
5589 instead of message->signature special-case string. Incremental
5590 step forward. Then we can fix up code to send the signature in the
5591 message, then fix up code to validate said signature, then fix up
5592 code to not put the typecodes inline, etc.
5593 (load_one_message): don't make up the signature after the fact
5594 (decode_header_data): require signature field for the known
5597 * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
5599 * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
5601 2004-06-07 Owen Fraser-Green <owen@discobabe.net>
5603 * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
5605 * mono/Handler.cs: Updated to follow new path argument for
5606 (un-)registering objects.
5608 * mono/example/Makefile.am:
5610 * configure.in: Bumped required version for mono and use new -pkg
5613 2004-06-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
5615 * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
5616 registration functions take the path argument as char* instead of
5619 * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
5620 split off the path decompostion part of
5621 _dbus_demarshal_object_path. Some misc. fixes to silence compiler
5624 * glib/dbus-gobject.c, test/test-service.c: update accordingly.
5626 2004-06-02 Kristian Høgsberg <krh@redhat.com>
5628 * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
5629 machine approach. A state is implemented as a function that
5630 handles incoming events as specified for that state.
5632 * doc/dbus-specification.xml: Update auth protocol state machine
5633 specification to match implementation. Remove some leftover
5636 2004-06-02 Kristian Høgsberg <krh@redhat.com>
5638 * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
5639 dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
5642 * Doxyfile.in: remove deprecated options.
5644 * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
5645 glib/test-thread.h, glib/test-thread-client.c,
5646 glib/test-thread-server.c, glib/test-profile.c,
5647 glib/test-dbus-glib.c: remove these unused files.
5649 2004-06-01 Olivier Andrieu <oliv__a@users.sourceforge.net>
5651 * dbus/dbus-object-tree.c
5652 (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
5653 non-fallback handlers (bug #684).
5654 (_dbus_object_subtree_new): initialize invoke_as_fallback field.
5655 (find_subtree_recurse): report wether the returned subtree is an
5656 exact match or a "fallback" match higher up in the tree.
5657 (object_tree_test_iteration): update test case.
5659 2004-06-01 Seth Nickell <seth@gnome.org>
5661 * python/dbus_bindings.pyx.in:
5662 * python/tests/test-client.py:
5664 Round off basic type support. Add dicts (yay!), and
5665 remaining array types.
5667 Make MessageIter more general so it works for dicts too.
5669 Mark all loop variables as C integers.
5671 2004-05-31 Havoc Pennington <hp@redhat.com>
5673 * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
5676 * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
5678 * glib/dbus-glib-tool.c (main): set up to have a --self-test
5679 option that runs the tests, and start filling in some code
5680 including for starters just dumping the interfaces to stdout
5682 * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
5684 * test/data/valid-introspection-files/lots-of-types.xml: test of
5685 an example introspection file
5687 * glib/dbus-gparser.c (parser_check_doctype): doctype should be
5690 2004-05-31 Seth Nickell <seth@gnome.org>
5692 * python/dbus_bindings.pyx.in:
5693 * python/tests/test-client.py:
5698 Fix string array memory trashing bug... oops...
5700 2004-05-30 Seth Nickell <seth@gnome.org>
5704 Add a nicer-but-less-flexible alternate API for handling
5705 calls to virtual objects in dbus.ObjectTree.
5707 Screw up the argument order to the dbus.Object constructor
5708 for consistency with dbus.ObjectTree (and to make dbus_methods
5709 optional for future extension)
5711 * python/examples/Makefile.am:
5712 * python/examples/gconf-proxy-service.py:
5713 * python/examples/gconf-proxy-service2.py:
5715 Alternate implementation of gconf-proxy-service using the
5716 nicer dbus.ObjectTree API.
5718 * python/examples/example-service.py:
5719 * python/tests/test-server.py
5721 Reverse the argument order to deal with dbus.Object constructor
5724 2004-05-30 Seth Nickell <seth@gnome.org>
5726 * python/examples/example-client.py:
5727 * python/examples/example-service.py:
5729 Take it back. Lists seem to work but they're broken
5730 in the test suite. Make the base examples use
5733 2004-05-30 Seth Nickell <seth@gnome.org>
5735 * python/dbus_bindings.pyx.in:
5736 * python/tests/test-client.py:
5738 Add some more tests and fix errors that crop up.
5739 Unfortunately, currently it seems like marshalling
5740 and unmarshalling of lists is completely broken :-(
5742 2004-05-30 Seth Nickell <seth@gnome.org>
5744 * python/dbus_bindings.pyx.in:
5746 Add support for ObjectPath type.
5750 Refactor message handling code to a common function.
5752 * python/tests/test-client.py:
5753 * python/tests/test-server.py:
5755 Add tests that check to make sure values of all types
5756 can be echoed from a service w/o mangling.
5758 2004-05-29 Seth Nickell <seth@gnome.org>
5762 Add ObjectTree class which allows implementation
5763 of trees of "virtual" objects. Basically the python
5764 wrapper for "register_fallback".
5766 * python/examples/Makefile.am
5767 * python/examples/gconf-proxy-client.py:
5768 * python/examples/gconf-proxy-service.py:
5770 Implement a simple GConf proxy service that supports
5771 get/set on string and int GConf keys using the ObjectTree.
5773 2004-05-29 Seth Nickell <seth@gnome.org>
5776 * python/examples/example-client.py:
5777 * python/examples/example-service.py:
5778 * python/examples/list-system-services.py:
5780 Add SessionBus, SystemBus and ActivationBus classes
5781 so you don't need to know the special little BUS_TYPE
5784 2004-05-29 Havoc Pennington <hp@redhat.com>
5786 * bus/config-parser.c (process_test_valid_subdir): temporarily
5787 stop testing config parser OOM handling, since expat has issues
5788 http://freedesktop.org/pipermail/dbus/2004-May/001153.html
5790 * bus/dbus-daemon-1.1.in: change requested_reply to
5791 send_requested_reply/receive_requested_reply so we can send the
5792 replies, not just receive them.
5794 * bus/config-parser.c: parse the new
5795 send_requested_reply/receive_requested_reply
5797 * bus/policy.c (bus_client_policy_check_can_send): add
5798 requested_reply argument and use it
5800 * bus/bus.c (bus_context_check_security_policy): pass through
5801 requested_reply status to message send check
5803 * bus/system.conf.in: adapt to requested_reply change
5805 2004-05-28 Havoc Pennington <hp@redhat.com>
5807 * test/glib/test-service-glib.c (main): remove unused variable
5809 * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
5811 * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
5812 from the enum, no longer in use.
5814 * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
5817 * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
5818 whether error_name passed in is a valid error name.
5820 2004-05-28 John (J5) Palmieri <johnp@redhat.com>
5822 * dbus/dbus-message.c (dbus_message_get_args): Added support for
5823 OBJECT_PATH and OBJECT_PATH_ARRAY
5825 2004-05-28 Seth Nickell <seth@gnome.org>
5827 * python/examples/Makefile.am:
5829 Forget to add Makefile.am. Do not pass go.
5831 2004-05-28 Michael Meeks <michael@ximian.com>
5833 * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal):
5836 * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
5838 * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
5839 (_dbus_message_iter_get_basic_type_array): impl.
5840 drastically simplify ~all relevant _get methods to use these.
5841 (_dbus_message_iter_append_basic_array),
5842 (dbus_message_iter_append_basic): impl
5843 drastically simplify ~all relevant _append methods to use these.
5845 * dbus/dbus-message-builder.c (parse_basic_type)
5846 (parse_basic_array, lookup_basic_type): impl.
5847 (_dbus_message_data_load): prune scads of duplicate /
5850 * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array)
5851 (_dbus_demarshal_basic_type): implement,
5852 (demarshal_and_validate_len/arg): beef up debug.
5853 (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
5855 2004-05-27 Seth Nickell <seth@gnome.org>
5858 * python/Makefile.am:
5860 Include the example python apps in the tarball.
5862 * python/examples/list-system-services.py
5864 Add a python new example that fetches the list of services
5865 from the system bus.
5867 2004-05-27 Seth Nickell <seth@gnome.org>
5870 * python/dbus_bindings.pyx.in:
5872 Fix failure to notify that a signal was not handled,
5873 resulted in hung functions.
5875 2004-05-25 Colin Walters <walters@redhat.com>
5877 * tools/dbus-monitor.c (main): Monitor all types of messages.
5879 2004-05-23 Owen Fraser-Green <owen@discobabe.net>
5881 * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
5882 which unregisters the object path and disposes the handler.
5884 2004-05-23 Kristian Høgsberg <krh@redhat.com>
5886 Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
5888 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
5889 operands to && so we call dbus_message_iter_next () for the last
5892 2004-05-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
5894 * dbus/dbus-object-tree.c
5895 (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
5896 children even if the requested path isn't registered.
5897 (object_tree_test_iteration): test object_tree_list_registered.
5899 * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
5902 2004-05-20 Kristian Høgsberg <krh@redhat.com>
5904 * doc/TODO: Remove resolved items.
5906 * bus/expirelist.h (struct BusExpireList): remove unused n_items
5909 * bus/connection.c (bus_connections_expect_reply): Enforce the
5910 per-connection limit on pending replies.
5912 Patch from Jon Trowbridge <trow@ximian.com>:
5914 * bus/main.c (setup_reload_pipe): Added. Creates a pipe and sets
5915 up a watch that triggers a config reload when one end of the pipe
5917 (signal_handler): Instead of doing the config reload in our SIGHUP
5918 handler, just write to the reload pipe and let the associated
5919 watch handle the reload when control returns to the main loop.
5921 * bus/driver.c (bus_driver_handle_reload_config): Added.
5922 Implements a ReloadConfig method for requesting a configuration
5923 file reload via the bus driver.
5925 2004-05-19 Owen Fraser-Green <owen@discobabe.net>
5927 * HACKING: Updated release instructions concerning the wiki page.
5929 2004-05-18 Kristian Høgsberg <krh@redhat.com>
5931 * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
5932 filter against auth->allowed_mechs; we only add allowed mechs in
5933 record_mechanisms().
5935 * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
5936 ALLOWED_MECHS to auth-script format so we can set the list of
5939 * data/auth/client-out-of-mechanisms.auth-script: New test to
5940 check client disconnects when it is out of mechanisms to try.
5942 * dbus/dbus-auth.c (process_command): Remove check for lines
5943 longer that 1 MB; we only buffer up maximum 16 kB.
5945 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
5946 dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
5947 Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
5948 assume there might be unused bytes.
5950 * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
5951 client-out-of-mechs, it is handled in process_reject(). Move check
5952 for max failures to send_rejected(), as it's a server-only thing.
5954 * dbus/dbus-auth.c: Factor out protocol reply code into functions
5955 send_auth(), send_data(), send_rejected(), send_error(),
5956 send_ok(), send_begin() and send_cancel().
5958 2004-05-17 Kristian Høgsberg <krh@redhat.com>
5960 Remove base64 encoding, replace with hex encoding. Original patch
5961 from trow@ximian.com, added error handling.
5963 * dbus/dbus-string.c (_dbus_string_base64_encode)
5964 (_dbus_string_base64_decode): Remove.
5965 (_dbus_string_hex_decode): Add end_return argument so we can
5966 distinguish between OOM and invalid hex encoding.
5967 (_dbus_string_test): Remove base64 tests and add test case for
5970 * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
5971 Replace base64 with hex.
5973 * test/data/auth/invalid-hex-encoding.auth-script: New test case
5974 for invalid hex encoded data in auth protocol.
5976 2004-05-17 Olivier Andrieu <oliv__a@users.sourceforge.net>
5978 * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
5981 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
5983 * mono/dbus-sharp.dll.config.in: Added for GAC
5984 * mono/dbus-sharp.snk: Added for GAC
5985 * mono/Assembly.cs.in: Added for GAC
5986 * mono/Makefile.am: Changes for GAC installation
5987 * configure.in: Added refs for dbus-sharp.dll.config.in and
5988 Assembly.cs.in. More fixes for mono testing
5989 * mono/example/Makefile.am: Changed var to CSC
5990 * Makefile.am: Changed flag name to DBUS_USE_CSC
5992 2004-05-15 Owen Fraser-Green <owen@discobabe.net>
5994 * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
5995 * mono/doc/*: Added documentation framework
5996 * configure.in: Added monodoc check
5997 * README: Added description of mono configure flags
5999 2004-05-11 John (J5) Palmieri <johnp@redhat.com>:
6001 * doc/dbus-specification.xml: Added a "Required" column to the
6002 header fields table and changed the "zero or more" verbage in
6003 the above paragraph to read "The header must contain the required
6004 named header fields and zero or more of the optional named header
6006 * test/data/invalid-messages/*.message: Added the required PATH
6007 named header field to the tests so that they don't fail on
6008 'Missing path field'
6010 2004-05-07 John (J5) Palmieri <johnp@redhat.com>
6012 * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
6013 the stack by implicitly defining variable and parameter types and
6014 removing the hack of defining C pointers as python objects and later
6017 2004-05-02 Owen Fraser-Green <owen@discobabe.net>
6019 * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
6021 2004-05-01 Owen Fraser-Green <owen@discobabe.net>
6023 * mono/DBusType/Dict.cs: Handle empty dicts
6024 * mono/DBusType/Array.cs: Handle empty arrays
6025 * mono/Arguments.cs: Handle empty arguments
6027 2004-04-30 Owen Fraser-Green <owen@discobabe.net>
6029 * dbus-sharp.pc.in: Modified to include include Libs and Requires
6032 2004-04-25 Kristian Høgsberg <krh@redhat.com>
6034 * test/data/valid-messages/standard-*.message: Update message
6035 test scripts to new header field names.
6037 2004-04-22 John (J5) Palmieri <johnp@redhat.com>
6039 * test/break-loader.c (randomly_do_n_things): tracked down buffer
6040 overflow to times_we_did_each_thing array which would chop off the
6041 first character of the failure_dir string. Increased the size of
6042 the array to 7 to reflect the number of random mutation functions
6045 2004-04-21 Kristian Høgsberg <krh@redhat.com>
6047 * dbus/dbus-server-unix.c (unix_finalize): Don't unref
6048 unix_server->watch here, it is unreffed in disconnect.
6049 (_dbus_server_new_for_tcp_socket): convert NULL host to
6050 "localhost" here so we don't append NULL to address.
6052 * dbus/dbus-server.c (_dbus_server_test): Add test case for
6053 various addresses, including tcp with no explicit host.
6055 2004-04-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
6057 * dbus/dbus-message.c (decode_header_data, decode_string_field):
6058 fix incorrect setting of .name_offset in the HeaderField (it was
6059 off by two bytes, positioned right after the name and typecode)
6061 * bus/bus.c (bus_context_new, bus_context_unref): test before
6062 calling dbus_server_free_data_slot and _dbus_user_database_unref
6063 in case of an error.
6065 * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
6068 2004-04-19 Kristian Høgsberg <krh@redhat.com>
6070 * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
6071 _dbus_poll() instead of select().
6073 2004-04-15 Jon Trowbridge <trow@ximian.com>
6075 * bus/main.c (signal_handler): Reload the configuration files
6077 (main): Set up our SIGHUP handler.
6079 * bus/bus.c (struct BusContext): Store the config file, user and
6080 fork flag in the BusContext.
6081 (process_config_first_time_only): Added. Contains the code
6082 (previously in bus_context_new) for setting up the BusContext from
6083 the BusConfigParser that should only be run the first time the
6084 config files are read.
6085 (process_config_every_time): Added. Contains the code (previously
6086 in bus_context_new) for setting up the BusContext from the
6087 BusConfigParser that should be run every time the config files are
6089 (load_config): Added. Builds a BusConfigParser from the config
6090 files and passes the resulting structure off to
6091 process_config_first_time_only (assuming this is the first time)
6092 and process_config_every_time.
6093 (bus_context_new): All of the config-related code has been moved
6094 to process_config_first_time_only and process_config_every_time.
6095 Now this function just does the non-config-related initializations
6096 and calls load_config.
6097 (bus_context_reload_config): Added.
6099 2004-04-15 Olivier Andrieu <oliv__a@users.sourceforge.net>
6101 * bus/driver.c (bus_driver_handle_get_service_owner):
6102 implement a GetServiceOwner method.
6103 * doc/dbus-specification.xml: document it.
6104 * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
6106 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
6107 implement, using the bus GetServiceOwner method.
6109 * test/glib/test-dbus-glib.c:
6110 use dbus_gproxy_new_for_service_owner so that we can receive the
6113 2004-04-15 John (J5) Palmieri <johnp@redhat.com>
6115 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
6116 dbus/dbus-message.c, dbus/dbus-protocol.h
6117 (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
6119 * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
6120 dbus/dbus-message.c, dbus/dbus-protocol.h
6121 (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
6123 * dbus/dbus-internals.c (_dbus_header_field_to_string):
6124 DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
6125 DBUS_HEADER_FIELD_SENDER resolves to "sender"
6127 * doc/dbus-specification.xml (Header Fields Table):
6128 s/SERVICE/DESTINATION
6129 s/SENDER_SERVICE/SENDER
6132 2004-04-14 Olivier Andrieu <oliv__a@users.sourceforge.net>
6134 * test/glib/test-dbus-glib.c (timed_exit): fail the test after
6137 2004-04-13 Michael Meeks <michael@ximian.com>
6139 * glib/dbus-gobject.c (handle_introspect): split out
6140 (introspect_properties): this.
6141 (handle_introspect): implement this.
6143 * test/glib/Makefile.am: use the absolute path so the bus
6144 daemon's chdir ("/") doesn't kill us dead.
6146 * configure.in: subst ABSOLUTE_TOP_BUILDDIR
6148 2004-04-12 Jon Trowbridge <trow@ximian.com>
6150 * bus/config-parser.c (struct BusConfigParser): Added
6151 included_files field.
6152 (seen_include): Added. Checks whether or not a file has already
6153 been included by any parent BusConfigParser.
6154 (bus_config_parser_new): Copy the parent's included_files.
6155 (include_file): Track which files have been included, and fail on
6156 circular inclusions.
6157 (process_test_valid_subdir): Changed printf to report if we are
6158 testing valid or invalid conf files.
6159 (all_are_equiv): Changed printf to be a bit clearer about
6160 what we are actually doing.
6161 (bus_config_parser_test): Test invalid configuration files.
6163 2004-04-09 Jon Trowbridge <trow@ximian.com>
6165 * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
6166 argument. If non-null, the newly-constructed BusConfigParser will
6167 be initialized with the parent's BusLimits instead of the default
6169 (include_file): When including a config file, pass in
6170 the current parser as the parent and then copy the BusLimits
6171 from the included BusConfigParser pack to the current parser.
6172 (process_test_valid_subdir): Renamed from process_test_subdir.
6173 (process_test_equiv_subdir): Added. Walks through a directory,
6174 descending into each subdirectory and loading the config files
6175 it finds there. If any subdirectory contains two config files
6176 that don't produce identical BusConfigParser structs, fail.
6177 For now, the BusConfigParser's BusPolicies are not compared.
6178 (bus_config_parser_test): Call both process_test_valid_subdir and
6179 process_test_equiv_subdir.
6181 * bus/config-loader-libxml.c (bus_config_load): Take a parent
6182 argument and pass it along to the call to bus_config_parser_new.
6183 Also made a few small changes to allow this code to compile.
6185 * bus/config-loader-expat.c (bus_config_load): Take a parent
6186 argument and pass it along to the call to bus_config_parser_new.
6188 * bus/bus.c (bus_context_new): Load the config file
6189 with a NULL parent argument.
6191 2004-03-29 Michael Meeks <michael@ximian.com>
6193 * glib/dbus-gobject.c (introspect_properties): split
6194 out, fix mangled 'while' flow control.
6195 (introspect_signals): implement.
6196 (handle_introspect): update.
6198 2004-03-29 Michael Meeks <michael@ximian.com>
6200 * glib/dbus-gobject.c (set_object_property): split out /
6201 re-work, use the property type, and not the message type(!)
6202 (get_object_property): ditto.
6204 * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
6205 (dbus_gvalue_marshal): make this code re-usable, needed
6206 for signals too, also on both proxy and server side.
6207 Re-write for more efficiency / readability.
6209 2004-03-29 Michael Meeks <michael@ximian.com>
6211 * dbus/dbus-message.c
6212 (dbus_message_new_error_printf): impl.
6214 * dbus/dbus-connection.c
6215 (dbus_connection_unregister_object_path): fix warning.
6217 * configure.in: fix no-mono-installed situation.
6219 2004-03-27 Havoc Pennington <hp@redhat.com>
6221 Patch from Timo Teräs:
6223 * tools/dbus-send.c (main): if --print-reply, assume type is
6224 method call; support boolean type args
6226 * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
6227 bunch of memleak and logic bugs
6229 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
6231 * mono/Arguments.cs:
6232 * mono/Introspector.cs:
6234 * mono/InterfaceProxy.cs:
6236 * mono/ProxyBuilder.cs:
6238 Added InterfaceProxy class to avoid building proxies for every
6242 * dbus-message.c (dbus_message_append_args_valist)
6243 (dbus_message_iter_get_object_path)
6244 (dbus_message_iter_get_object_path_array)
6245 (dbus_message_iter_append_object_path)
6246 (dbus_message_iter_append_object_path_array):
6247 Added object_path iter functions to handle OBJECT_PATH arguments
6249 2004-03-23 Owen Fraser-Green <owen@discobabe.net>
6251 First checkin of mono bindings.
6254 Build stuff for the bindings
6255 * dbus-sharp.pc.in: Added for pkgconfig
6257 2004-03-21 Havoc Pennington <hp@redhat.com>
6259 * test/test-service.c (main): remove debug spew
6261 2004-03-21 Olivier Andrieu <oliv__a@users.sourceforge.net>
6263 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
6266 * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
6267 (dbus_message_iter_init_array_iterator)
6268 (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
6269 indicate whether the iterator is empty
6271 * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
6274 2004-03-19 Havoc Pennington <hp@redhat.com>
6276 * NEWS: 0.21 updates
6278 * configure.in: 0.21
6280 * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
6282 * python/Makefile.am: change to avoid dist of dbus_bindings.c so
6283 you don't need pyrex to make dist
6285 * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
6288 2004-03-18 Richard Hult <richard@imendio.com>
6290 * dbus/dbus-message.c (dbus_message_get_auto_activation)
6291 (dbus_message_set_auto_activation): Add doxygen docs.
6293 2004-03-16 Richard Hult <richard@imendio.com>
6295 * bus/activation.c: (bus_activation_service_created),
6296 (bus_activation_send_pending_auto_activation_messages),
6297 (bus_activation_activate_service):
6299 * bus/dispatch.c: (bus_dispatch),
6300 (check_nonexistent_service_auto_activation),
6301 (check_service_auto_activated),
6302 (check_segfault_service_auto_activation),
6303 (check_existent_service_auto_activation), (bus_dispatch_test):
6304 * bus/driver.c: (bus_driver_handle_activate_service):
6305 * bus/services.c: (bus_registry_acquire_service):
6306 * dbus/dbus-message.c: (dbus_message_set_auto_activation),
6307 (dbus_message_get_auto_activation):
6308 * dbus/dbus-message.h:
6309 * dbus/dbus-protocol.h: Implement auto-activation.
6311 * doc/dbus-specification.xml: Add auto-activation to the spec.
6313 2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
6315 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
6316 fix a bug with CUSTOM types.
6318 * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
6319 a unit test for this bug (used to fail).
6321 2004-03-12 Mikael Hallendal <micke@imendio.com>
6324 (babysitter_watch_callback): notify all pending activations waiting for
6325 the same exec that the activation failed.
6326 (bus_activation_activate_service): shortcut the activation if we
6327 already waiting for the same executable to start up.
6329 2004-03-12 Mikael Hallendal <micke@imendio.com>
6332 - Added service file reloading.
6333 Each service files directory is kept in an hash table in
6334 BusActivation and each BusActivationEntry knows what .service-file it
6335 was read from. So when you try to activate a service the bus will
6336 check if it's been updated, removed or if new .service-files has
6338 - Test code at the bottom for the service file reloading.
6339 * bus/test-main.c: (main):
6341 - added service reloading test.
6342 * dbus/dbus-sysdeps.c:
6343 * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
6345 2004-03-08 Michael Meeks <michael@ximian.com>
6347 * dbus/dbus-connection.c (_dbus_connection_block_for_reply):
6348 bail immediately if disconnected, to avoid busy loop.
6350 * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
6351 cleanup cut/paste/inefficiency.
6353 2004-03-01 David Zeuthen <david@fubar.dk>
6355 * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
6356 bug where args were used twice. This bug resulted in a segfault
6357 on a Debian/PPC system when starting the messagebus daemon. Include
6358 dbus-sysdeps.h for DBUS_VA_COPY
6360 * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
6362 * configure.in: Check for va_copy; define DBUS_VA_COPY to the
6363 appropriate va_copy implementation. From GLib
6365 2004-02-24 Joe Shaw <joe@ximian.com>
6367 * bus/services.c (bus_registry_acquire_service): We need to pass
6368 in the service name to dbus_set_error() to prevent a crash.
6370 2003-12-26 Anders Carlsson <andersca@gnome.org>
6372 * AUTHORS: Reveal my True identity.
6374 2003-12-17 Mikael Hallendal <micke@imendio.com>
6376 * dbus/dbus-message.c: (dbus_message_append_args_valist):
6377 - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
6379 2003-12-13 Mikael Hallendal <micke@imendio.com>
6381 * doc/TODO: Added not about better error check of configuration files.
6383 2003-12-02 Richard Hult <richard@imendio.com>
6385 * Update AFL version to 2.0 throughout the source files to reflect
6386 the update that was done a while ago.
6388 2003-12-02 Richard Hult <richard@imendio.com>
6390 * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
6391 wrote_dict_key to FALSE on the iter that the dict is appended to,
6392 just like when appending other types. Fixes a bug where a dict
6393 couldn't be put inside a dict.
6394 (dbus_message_iter_append_dict_key): Fix typo in warning message.
6395 (message_iter_test, _dbus_message_test): Add test case for dict
6398 2003-12-01 David Zeuthen <david@fubar.dk>
6400 * python/dbus.py: Add the actual message when calling the reciever
6401 of a signal such that parameters can be inspected. Add the method
6402 remove_signal_receiver
6404 2003-11-26 Mikael Hallendal <micke@imendio.com>
6408 * glib/*.[ch]: Made ref functions return the pointer
6410 2003-11-25 Zack Rusin <zack@kde.org>
6412 * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
6414 * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer
6417 * qt/connection.h, qt/connection.cpp: Adjusting to changes in
6418 the Integrator and to better fit with the server,
6420 2003-11-24 Zack Rusin <zack@kde.org>
6422 * qt/connection.h, qt/connection.cpp: removing initDbus method since
6423 the integrator handles it now
6425 * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
6426 since QTimer wasn't really meant to be used the way DBusTimeout is
6428 2003-11-24 Zack Rusin <zack@kde.org>
6430 * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding
6431 Integrator class which integrates D-BUS with the Qt event loop,
6433 * qt/connection.h, qt/connection.cpp: Move all the code which
6434 was dealing with D-BUS integration to the Integrator class,
6435 and start using Integrator,
6437 2003-11-23 Zack Rusin <zack@kde.org>
6439 * qt/connection.h, qt/connection.cpp: Adding the DBusConnection
6442 * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
6443 switching namespaces to DBusQt, reworking the class,
6445 * Makefile.cvs: switching dependencies so that it matches KDE
6448 * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to
6451 2003-11-19 Havoc Pennington <hp@redhat.com>
6455 * configure.in: bump version to 0.20
6457 * configure.in (have_qt): add yet another place to look for qt
6458 (someone hand trolltech a .pc file...)
6460 2003-11-01 Havoc Pennington <hp@redhat.com>
6462 * doc/dbus-specification.xml: add state machine docs on the auth
6463 protocol; just a first draft, I'm sure it's wrong.
6465 2003-10-28 David Zeuthen <david@fubar.dk>
6467 * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
6468 return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
6470 2003-10-28 Havoc Pennington <hp@redhat.com>
6472 * dbus/dbus-message.c (get_next_field): delete unused function
6474 2003-10-28 Havoc Pennington <hp@redhat.com>
6476 * bus/expirelist.c (do_expiration_with_current_time): detect
6477 failure of the expire_func due to OOM
6479 * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
6481 * bus/dispatch.c (check_send_exit_to_service): fix to handle the
6482 NoReply error that's now created by the bus when the service exits
6484 2003-10-28 Havoc Pennington <hp@redhat.com>
6486 * dbus/dbus-message.c (_dbus_message_test): enable and fix the
6487 tests for set_path, set_interface, set_member, etc.
6489 * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
6491 * dbus/dbus-message.c (set_string_field): always just delete and
6492 re-append the field; accept NULL for deletion
6493 (re_align_fields_recurse): reimplement
6495 2003-10-26 Havoc Pennington <hp@redhat.com>
6497 * dbus/dbus-connection.c: fix docs to properly describe the
6498 disconnected message
6499 (_dbus_connection_notify_disconnected): remove this function;
6500 we can't synchronously add the disconnected message, we have to
6501 do it after we've queued any remaining real messages
6502 (_dbus_connection_get_dispatch_status_unlocked): queue the
6503 disconnect message only if the transport has finished queueing all
6504 its real messages and is disconnected.
6505 (dbus_connection_disconnect): update the dispatch status here
6507 2003-10-22 Havoc Pennington <hp@redhat.com>
6509 * bus/bus.c (bus_context_check_security_policy): fix up assertion
6511 * bus/connection.c (bus_transaction_send_from_driver): set the
6512 destination to the connection's base service
6514 2003-10-20 Havoc Pennington <hp@redhat.com>
6516 hmm, make check is currently not passing.
6518 * doc/dbus-specification.xml: add requirement that custom type
6519 names follow the same rules as interface names.
6521 * dbus/dbus-protocol.h: change some of the byte codes, to avoid
6522 duplication and allow 'c' to be 'custom'; dict is now 'm' for
6525 * doc/dbus-specification.xml: update type codes to match
6526 dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
6527 CUSTOM. Add type OBJECT_PATH to the spec.
6529 2003-10-17 Havoc Pennington <hp@redhat.com>
6531 * bus/driver.c (create_unique_client_name): use "." as separator
6532 in base service names instead of '-'
6534 * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
6535 byte at the end of the string
6537 * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
6538 optimization macros since string validation seems to be a slow
6541 * doc/dbus-specification.xml: restrict valid
6542 service/interface/member/error names. Add test suite code for the
6545 * dbus/dbus-string.c: limit service/interface/member/error names
6548 * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
6549 format arg to verbose spew
6551 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
6552 memory, return instead of g_error
6554 * test/test-service.c (path_message_func): support emitting a
6557 * dbus/dbus-bus.c (init_connections_unlocked): only fill in
6558 activation bus type if DBUS_BUS_ACTIVATION was set; default to
6559 assuming the activation bus was the session bus so that services
6560 started manually will still register.
6561 (init_connections_unlocked): fix so that in OOM situation we get
6562 the same semantics when retrying the function
6564 * test/test-service.c (main): change to use path registration, to
6565 test those codepaths; register with DBUS_BUS_ACTIVATION rather
6566 than DBUS_BUS_SESSION
6568 2003-10-16 Havoc Pennington <hp@redhat.com>
6570 * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
6572 * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
6573 coverage of the tests
6574 (coverage-report.txt): don't move the .da and .bbg files around
6576 2003-10-16 Havoc Pennington <hp@redhat.com>
6578 * bus/bus.c (struct BusContext): remove struct field I didn't mean
6581 2003-10-16 Havoc Pennington <hp@redhat.com>
6583 * bus/connection.c (bus_pending_reply_expired): either cancel or
6585 (bus_connections_check_reply): use unlink, not remove_link, as we
6586 don't want to free the link; fixes double free mess
6588 * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
6589 where no reply was received
6591 * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
6594 * bus/signals.c (match_rule_matches): add special cases for the
6595 bus driver, so you can match on sender/destination for it.
6597 * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
6598 DBUS_PRINT_BACKTRACE is set
6600 * dbus/dbus-internals.c: add pid to assertion failure messages
6602 * dbus/dbus-connection.c: add message type code to the debug spew
6604 * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
6605 sender=foo not service=foo
6607 * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
6608 session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
6609 DBUS_ACTIVATION_ADDRESS instead
6611 * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
6612 DBUS_SYSTEM_BUS_ADDRESS if appropriate
6614 * bus/bus.c (bus_context_new): handle OOM copying bus type into
6617 * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
6618 (dbus_message_iter_get_object_path_array): new function (half
6619 finished, disabled for the moment)
6621 * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
6622 DBUS_MESSAGE_TYPE_ERROR
6624 * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
6625 avoid redirecting stderr to /dev/null
6626 (babysit): close stdin if not doing the "exit_with_session" thing
6628 * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
6629 debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
6630 stdout/stdin, so things don't get confused
6632 * bus/system.conf.in: fix to allow replies, I modified .conf
6633 instead of .conf.in again.
6635 2003-10-14 David Zeuthen <david@fubar.dk>
6637 * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
6638 argtype to arg_type when raising unknown arg type exception.
6639 Changed type list to reflect the changes in dbus-protocol.h so
6640 the bindings actually work.
6642 2003-10-14 Havoc Pennington <hp@redhat.com>
6644 * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
6645 to have a bug keeping it from outputting the .da files sometimes
6646 (string_get_string): don't append garbage nul bytes to the string.
6648 2003-10-15 Seth Nickell <seth@gnome.org>
6650 * python/Makefile.am:
6652 Include dbus_h_wrapper.h in the dist tarball.
6654 2003-10-14 Havoc Pennington <hp@redhat.com>
6656 * bus/bus.c (bus_context_check_security_policy): revamp this to
6657 work more sanely with new policy-based requested reply setup
6659 * bus/connection.c (bus_transaction_send_from_driver): set bus
6660 driver messages as no reply
6662 * bus/policy.c (bus_client_policy_check_can_receive): handle a
6663 requested_reply attribute on allow/deny rules
6665 * bus/system.conf: add <allow requested_reply="true"/>
6667 * bus/driver.c (bus_driver_handle_message): fix check for replies
6668 sent to the bus driver, which was backward. How did this ever work
6669 at all though? I think I'm missing something.
6671 * dbus/dbus-message.c (decode_header_data): require error and
6672 method return messages to have a reply serial field to be valid
6673 (_dbus_message_loader_queue_messages): break up this function;
6674 validate that reply serial and plain serial are nonzero;
6675 clean up the OOM/error handling.
6676 (get_uint_field): don't return -1 from this
6677 (dbus_message_create_header): fix signed/unsigned bug
6679 * bus/connection.c (bus_connections_expect_reply): save serial of
6680 the incoming message, not reply serial
6682 2003-10-14 Havoc Pennington <hp@redhat.com>
6684 * bus/connection.c: implement pending reply tracking using
6687 * bus/bus.c (bus_context_check_security_policy): verify that a
6688 reply is pending in order to allow a reply to be sent. Deny
6689 messages of unknown type.
6691 * bus/dbus-daemon-1.1.in: update to mention new resource limits
6693 * bus/bus.c (bus_context_get_max_replies_per_connection): new
6694 (bus_context_get_reply_timeout): new
6696 2003-10-13 Seth Nickell <seth@gnome.org>
6698 * python/Makefile.am:
6700 Pass "make distcheck": remove a couple files from DIST_FILES
6701 that weren't included in the final version.
6703 2003-10-12 Havoc Pennington <hp@pobox.com>
6705 Added test code that 1) starts an actual bus daemon and 2) uses
6706 DBusGProxy; fixed bugs that were revealed by the test. Lots
6707 more testing possible, but this is the basic framework.
6709 * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
6710 empty proxy lists from the proxy list hash
6712 * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
6713 couple of return_if_fail checks
6715 * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
6716 to allocate, so everything is cleared to NULL as it should be.
6718 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
6719 source as data to dbus_connection_set_timeout_functions() as the
6720 timeout functions expected
6722 * test/glib/run-test.sh: add a little script to start up a message
6723 bus and run tests using it
6725 * tools/dbus-launch.1: updates
6727 * tools/dbus-launch.c (main): add --config-file option
6729 * tools/dbus-launch.c (main): remove confusing else if (runprog)
6730 that could never be reached.
6732 * dbus/dbus-message.c (dbus_message_new_method_return)
6733 (dbus_message_new_error, dbus_message_new_signal): set the
6734 no-reply-expected flag on all these. Redundant, but may
6735 as well be consistent.
6737 2003-10-11 Havoc Pennington <hp@pobox.com>
6739 * test/decode-gcov.c (function_solve_graph): make broken block
6740 graph a nonfatal error since it seems to be broken. Need to debug
6743 * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
6744 can't just check type > INVALID < LAST anymore
6746 * dbus/dbus-message.c (dbus_message_get_signature): new function
6747 (dbus_message_has_signature): new function
6748 (struct DBusMessage): add signature field (right now it isn't sent
6749 over the wire, just generated on the fly)
6750 (dbus_message_copy): copy the signature, and init strings to
6751 proper length to avoid some reallocs
6752 (dbus_message_iter_init_array_iterator): return void, since it
6754 (dbus_message_iter_init_dict_iterator): return void since it can't fail
6755 (_dbus_message_loader_queue_messages): add silly temporary hack to
6756 fill in message->signature on load
6758 * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
6759 characters, so they are relatively human-readable.
6761 2003-10-11 Havoc Pennington <hp@pobox.com>
6763 * dbus/dbus-message.c (_dbus_message_test): add more test
6764 coverage, but #if 0 for now since they uncover a bug
6765 not fixed yet; I think in re_align_field_recurse()
6766 (re_align_field_recurse): add FIXME about broken assertion
6768 * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
6770 * bus/connection.c: share a couple code bits with expirelist.c
6772 * bus/expirelist.h, bus/expirelist.c: implement a generic
6773 expire-items-after-N-seconds facility, was going to share between
6774 expiring connections and replies, decided not to use for expiring
6775 connections for now.
6777 * COPYING: include AFL 2.0 (still need to change all the file headers)
6779 2003-10-09 Havoc Pennington <hp@redhat.com>
6781 * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
6782 gcc 3.3. Not that we do anything about it yet.
6784 * bus/signals.c (bus_match_rule_parse): impose max length on the
6787 * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
6789 2003-10-09 Havoc Pennington <hp@redhat.com>
6791 Make matching rules theoretically work (add parser).
6793 * bus/bus.c (bus_context_check_security_policy): fix up to handle
6794 the case where destination is explicitly specified as bus driver
6795 and someone else is eavesdropping.
6797 * bus/policy.c (bus_client_policy_check_can_receive): fix up
6798 definition of eavesdropping and assertion
6800 * tools/dbus-send.c (main): use dbus_message_type_from_string
6802 * bus/signals.c (bus_match_rule_parse): implement
6804 * dbus/dbus-message.c (dbus_message_type_from_string): new
6806 * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
6808 2003-10-02 Havoc Pennington <hp@pobox.com>
6810 * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
6811 dbus_gproxy_oneway_call
6813 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main)
6814 (dbus_server_setup_with_g_main): fix to allow calling them more
6815 than once on the same args
6816 (dbus_bus_get_with_g_main): new function
6818 2003-10-02 Havoc Pennington <hp@redhat.com>
6820 * doc/dbus-tutorial.xml: write some stuff
6822 2003-09-29 Havoc Pennington <hp@pobox.com>
6824 * configure.in: split checks for Doxygen from XML docs, check for
6827 * doc/Makefile.am: XML-ify all the docs, and add a blank
6830 2003-09-29 Havoc Pennington <hp@pobox.com>
6832 * Merge dbus-object-names branch. To see the entire patch
6833 do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
6834 it's huuuuge though.
6835 To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
6837 2003-09-28 Havoc Pennington <hp@pobox.com>
6839 * HACKING: update to reflect new server
6841 2003-09-26 Seth Nickell <seth@gnome.org>
6844 * python/examples/example-signals.py:
6846 Start implementing some notions of signals. The API
6847 is really terrible, but they sort of work (with the
6848 exception of being able to filter by service, and to
6849 transmit signals *as* a particular service). Need to
6850 figure out how to make messages come from the service
6853 * python/dbus_bindings.pyx.in:
6855 Removed duplicate message_handler callbacks.
6857 2003-09-25 Havoc Pennington <hp@redhat.com>
6859 * bus/session.conf.in: fix my mess
6861 2003-09-25 Havoc Pennington <hp@pobox.com>
6863 * bus/session.conf.in: fix security policy, reported by Seth Nickell
6865 2003-09-25 Seth Nickell <seth@gnome.org>
6867 * python/examples/example-service.py:
6869 Johan notices complete wrong code in example-service, but
6870 completely wrong in a way that works exactly the same (!).
6871 Johan is confused, how could this possibly work? Example
6872 code fails to serve purpose of making things clear.
6875 2003-09-25 Mark McLoughlin <mark@skynet.ie>
6877 * doc/dbus-specification.sgml: don't require header fields
6878 to be 4-byte aligned and specify that fields should be
6879 distinguished from padding by the fact that zero is not
6882 * doc/TODO: remove re-alignment item and add item to doc
6883 the OBJECT_PATH type.
6885 * dbus/dbus-message.c:
6886 (HeaderField): rename the original member to value_offset
6887 and introduce a name_offset member to keep track of where
6888 the field actually begins.
6889 (adjust_field_offsets): remove.
6890 (append_int_field), (append_uint_field),
6891 (append_string_field): don't align the start of the header
6892 field to a 4-byte boundary.
6893 (get_next_field): impl finding the next marhsalled field
6894 after a given field.
6895 (re_align_field_recurse): impl re-aligning a number of
6896 already marshalled fields.
6897 (delete_field): impl deleting a field of any type and
6898 re-aligning any following fields.
6899 (delete_int_or_uint_field), (delete_string_field): remove.
6900 (set_int_field), (set_uint_field): no need to re-check
6901 that we have the correct type for the field.
6902 (set_string_field): ditto and impl re-aligning any
6904 (decode_header_data): update to take into account that
6905 the fields aren't 4-byte aligned any more and the new
6906 way to distinguish padding from header fields. Also,
6907 don't exit when there is too much header padding.
6908 (process_test_subdir): print the directory.
6909 (_dbus_message_test): add test to make sure a following
6910 field is re-aligned correctly after field deletion.
6912 * dbus/dbus-string.[ch]:
6913 (_dbus_string_insert_bytes): rename from insert_byte and
6914 allow the insert of multiple bytes.
6915 (_dbus_string_test): test inserting multiple bytes.
6917 * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
6918 warning note to docs about having to re-align any
6919 marshalled values following the string.
6921 * dbus/dbus-message-builder.c:
6922 (append_string_field), (_dbus_message_data_load):
6923 don't align the header field.
6925 * dbus/dbus-auth.c: (process_test_subdir): print the
6928 * test/break-loader.c: (randomly_add_one_byte): upd. for
6931 * test/data/invalid-messages/bad-header-field-alignment.message:
6934 * test/data/valid-messages/unknown-header-field.message: shove
6935 a dict in the unknown field.
6937 2003-09-25 Seth Nickell <seth@gnome.org>
6940 * python/dbus_bindings.pyx.in:
6942 Handle return values.
6944 * python/examples/example-client.py:
6945 * python/examples/example-service.py:
6947 Pass back return values from the service to the client.
6949 2003-09-24 Seth Nickell <seth@gnome.org>
6953 Connect Object methods (when you are sharing an object) up... pass
6954 in a list of methods to be shared. Sharing all the methods just
6955 worked out too weird. You can now create nice Services over the
6958 * python/dbus_bindings.pyx.in:
6960 Keep references to user_data tuples passed into C functions so
6961 Python doesn't garbage collect on us.
6963 Implement MethodReturn and Error subclasses of Message for creating
6964 DBusMessage's of those types.
6966 * python/examples/example-client.py:
6967 * python/examples/example-service.py:
6969 Simple example code showing both how create DBus services and objects,
6970 and how to use them.
6972 2003-09-23 Havoc Pennington <hp@pobox.com>
6974 * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
6976 2003-09-23 Havoc Pennington <hp@redhat.com>
6978 * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
6979 (dbus_gproxy_disconnect_signal): implement
6980 (dbus_gproxy_manager_remove_signal_match): implement
6981 (dbus_gproxy_manager_add_signal_match): implement
6982 (dbus_gproxy_oneway_call): implement
6984 2003-09-23 Havoc Pennington <hp@pobox.com>
6986 * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
6987 subclass. This means dropping the transparent thread safety of the
6988 proxy; you now need a separate proxy per-thread, or your own
6989 locking on the proxy. Probably right anyway.
6990 (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
6992 2003-09-22 Havoc Pennington <hp@redhat.com>
6994 * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
6996 2003-09-21 Seth Nickell <seth@gnome.org>
6998 First checkin of the Python bindings.
7000 * python/.cvsignore:
7001 * python/Makefile.am:
7002 * python/dbus_bindings.pyx.in:
7003 * python/dbus_h_wrapper.h:
7005 Pieces for Pyrex to operate on, building a dbus_bindings.so
7006 python module for low-level access to the DBus APIs.
7010 High-level Python module for accessing DBus objects.
7015 Build stuff for the python bindings.
7019 Extra macro needed for finding the Python C header files.
7021 2003-09-21 Havoc Pennington <hp@pobox.com>
7023 * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
7024 implementing the proxy manager, didn't get very far.
7026 * dbus/dbus-bus.c (dbus_bus_add_match): new
7027 (dbus_bus_remove_match): new
7029 * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
7030 path_name argument; adjust the other not-yet-implemented
7031 gproxy constructors to be what I think they should be.
7033 2003-09-21 Havoc Pennington <hp@pobox.com>
7035 * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
7036 by default for message bus connections.
7038 * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
7039 exit_on_disconnect flag is set and we process the disconnected
7041 (dbus_connection_set_exit_on_disconnect): new function
7043 2003-09-21 Havoc Pennington <hp@pobox.com>
7045 Get matching rules mostly working in the bus; only actually
7046 parsing the rule text remains. However, the client side of
7047 "signal connections" hasn't been started, this patch is only the
7050 * dbus/dispatch.c: fix for the matching rules changes
7052 * bus/driver.c (bus_driver_handle_remove_match)
7053 (bus_driver_handle_add_match): send an ack reply from these
7056 * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
7057 arguments, reported by Seth Nickell
7059 * bus/config-parser.c (append_rule_from_element): support
7060 eavesdrop=true|false attribute on policies so match rules
7061 can be prevented from snooping on the system bus.
7063 * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
7064 and "destination" in attribute names; fix some docs bugs;
7065 add eavesdrop=true|false attribute
7067 * bus/driver.c (bus_driver_handle_add_match)
7068 (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
7071 * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
7072 rid of broadcast service concept, signals are just always broadcast
7074 * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
7075 mostly implement matching rules stuff (currently only exposed as signal
7078 2003-09-21 Mark McLoughlin <mark@skynet.ie>
7080 * doc/dbus-specification.sgml: Change the header field name
7081 to be an enum and update the rest of the spec to reference
7082 the fields using the conventinal name.
7084 * dbus/dbus-protocol.h: update to reflect the spec.
7086 * doc/TODO: add item to remove the 4 byte alignment requirement.
7088 * dbus/dbus-message.c: Remove the code to generalise the
7089 header/body length and serial number header fields as named
7090 header fields so we can reference field names using the
7092 (append_int_field), (append_uint_field), (append_string_field):
7093 Append the field name as a byte rather than four chars.
7094 (delete_int_or_uint_field), (delete_string_field): reflect the
7095 fact that the field name and typecode now occupy 4 bytes instead
7097 (decode_string_field), (decode_header_data): update to reflect
7098 protocol changes and move the field specific encoding from
7099 decode_string_field() back into decode_header_data().
7101 * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
7102 Add utility to aid debugging.
7104 * dbus/dbus-message-builder.c:
7105 (append_string_field), (_dbus_message_data_load): Update to
7106 reflect protocol changes; Change the FIELD_NAME directive
7107 to HEADER_FIELD and allow it to take the field's conventional
7108 name rather than the actual value.
7110 * test/data/*/*.message: Update to use HEADER_FIELD instead
7111 of FIELD_NAME; Always align the header on an 8 byte boundary
7112 *before* updating the header length.
7114 2003-09-15 Havoc Pennington <hp@pobox.com>
7116 * dbus/dbus-pending-call.c: add the get/set object data
7117 boilerplate as for DBusConnection, etc. Use generic object data
7118 for the notify callback.
7120 * glib/dbus-gparser.c (parse_node): parse child nodes
7122 * tools/dbus-viewer.c: more hacking on the dbus-viewer
7124 * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
7125 contain functions shared between the convenience lib and the
7128 * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
7129 -export-symbols-regex to the GLib library
7131 * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
7132 fix the locking in here, and add a default handler for
7133 Introspect() that just returns sub-nodes.
7135 2003-09-14 Havoc Pennington <hp@pobox.com>
7137 * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
7138 rather than gfoo consistent
7140 * glib/dbus-gproxy.h: delete for now, move contents to
7141 dbus-glib.h, because the include files don't work right since we
7142 aren't in the dbus/ subdir.
7144 * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
7145 (dbus_gproxy_end_call): finish
7146 (dbus_gproxy_begin_call): finish
7148 * glib/dbus-gmain.c (dbus_set_g_error): new
7150 * glib/dbus-gobject.c (handle_introspect): include information
7151 about child nodes in the introspection
7153 * dbus/dbus-connection.c (dbus_connection_list_registered): new
7154 function to help in implementation of introspection
7156 * dbus/dbus-object-tree.c
7157 (_dbus_object_tree_list_registered_and_unlock): new function
7159 2003-09-12 Havoc Pennington <hp@pobox.com>
7161 * glib/dbus-gidl.h: add common base class for all the foo_info
7164 * tools/dbus-viewer.c: add GTK-based introspection UI thingy
7167 * test/Makefile.am: try test srcdir -ef . in addition to test
7168 srcdir = ., one of them should work (yeah lame)
7170 * glib/Makefile.am: build the "idl" parser stuff as a convenience
7173 * glib/dbus-gparser.h: make description_load routines return
7174 NodeInfo* not Parser*
7176 * Makefile.am (SUBDIRS): build test dir after all library dirs
7178 * configure.in: add GTK+ detection
7180 2003-09-07 Havoc Pennington <hp@pobox.com>
7182 * Make Doxygen contented.
7184 2003-09-07 Havoc Pennington <hp@pobox.com>
7186 * doc/dbus-specification.sgml: more updates
7188 2003-09-06 Havoc Pennington <hp@pobox.com>
7190 * doc/dbus-specification.sgml: partial updates
7192 * bus/dbus-daemon-1.1.in: fix the config file docs for the
7193 zillionth time; hopefully I edited the right file this time.
7195 * bus/config-parser.c (append_rule_from_element): support
7196 send_type, send_path, receive_type, receive_path
7198 * bus/policy.c: add message type and path to the list of things
7199 that can be "firewalled"
7201 2003-09-06 Havoc Pennington <hp@pobox.com>
7203 * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
7204 (dbus_connection_register_object_path): make this not handle
7205 messages to paths below the given path
7207 2003-09-03 Havoc Pennington <hp@pobox.com>
7209 * test/glib/Makefile.am: add this with random glib-linked test
7212 * glib/Makefile.am: remove the random test programs from here,
7213 leave only the unit tests
7215 * glib/dbus-gobject.c (_dbus_gobject_test): add test for
7216 uscore/javacaps conversion, and fix
7217 (get_object_property, set_object_property): change to .NET
7218 convention for mapping props to methods, set_FooBar/get_FooBar,
7219 since one language has such a convention we may as well copy it.
7220 Plus real methods in either getFooBar or get_foo_bar style won't
7221 collide with this convention.
7223 2003-09-01 Havoc Pennington <hp@pobox.com>
7225 * glib/dbus-gparser.c: implement
7227 * glib/dbus-gobject.c: start implementing skeletons support
7229 * configure.in: when disabling checks/assert, also define
7230 G_DISABLE_ASSERT and G_DISABLE_CHECKS
7232 2003-09-01 Havoc Pennington <hp@pobox.com>
7234 * glib/Makefile.am: rearrange a bunch of files and get "make
7235 check" framework set up
7237 2003-08-31 Havoc Pennington <hp@pobox.com>
7239 * fix build with --disable-tests
7241 2003-08-30 Havoc Pennington <hp@pobox.com>
7243 * dbus/dbus-connection.c: purge DBusMessageHandler
7245 * dbus/dbus-message-handler.c: remove DBusMessageHandler, just
7246 use callbacks everywhere
7248 2003-08-30 Havoc Pennington <hp@pobox.com>
7250 * test/data/valid-config-files/system.d/test.conf: change to
7251 root for the user so warnings don't get printed
7253 * dbus/dbus-message.c: add dbus_message_get_path,
7254 dbus_message_set_path
7256 * dbus/dbus-object-tree.c (do_test_dispatch): add test of
7257 dispatching to a path
7259 * dbus/dbus-string.c (_dbus_string_validate_path): add
7261 * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
7262 (_dbus_marshal_object_path): implement
7264 * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field
7265 to contain the path to the target object
7266 (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
7267 DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
7269 2003-08-30 Havoc Pennington <hp@pobox.com>
7271 * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
7273 2003-08-29 Havoc Pennington <hp@pobox.com>
7275 * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
7277 (struct DBusObjectSubtree): shrink this
7278 a lot, since we may have a lot of them
7279 (_dbus_object_tree_free_all_unlocked): implement
7280 (_dbus_object_tree_dispatch_and_unlock): implement
7282 2003-08-29 Havoc Pennington <hp@pobox.com>
7284 * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
7286 2003-08-28 Havoc Pennington <hp@pobox.com>
7290 * dbus/dbus-connection.c: port to no ObjectID, create a
7291 DBusObjectTree, rename ObjectTree to ObjectPath in public API
7293 * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete
7294 everything except UnregisterFunction and MessageFunction
7296 * dbus/dbus-marshal.c: port away from DBusObjectID,
7297 add DBUS_TYPE_OBJECT_PATH
7299 * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc],
7300 dbus/dbus-objectid.[hc]: remove these, we are moving to
7301 path-based object IDs
7303 2003-08-25 Havoc Pennington <hp@pobox.com>
7305 Just noticed that dbus_message_test is hosed, I wonder when I
7306 broke that. I thought make check was passing earlier...
7308 * dbus/dbus-object-tree.c: add new "object tree" to match DCOP
7309 container tree, will replace most of dbus-object-registry
7311 * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
7314 2003-08-19 Havoc Pennington <hp@pobox.com>
7316 * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
7317 (dbus_message_is_error): fix this function
7319 * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
7322 * bus/policy.c (bus_client_policy_check_can_receive): fix code to
7323 reflect clarified man page
7324 (bus_client_policy_check_can_send): ditto
7326 * bus/session.conf.in: fixup
7328 * bus/system.conf.in: fixup
7330 2003-08-18 Havoc Pennington <hp@redhat.com>
7332 * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
7334 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
7335 dumb bug created earlier (wrong order of args to
7336 decode_header_data())
7338 * tools/dbus-send.c: port
7340 * tools/dbus-print-message.c (print_message): port
7342 * test/data/*messages: port all messages over
7344 * dbus/dbus-message-builder.c: support including
7347 * bus/driver.c: port over
7349 * bus/dispatch.c: port over to new stuff
7351 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7352 rename disconnect signal to "Disconnected"
7354 2003-08-17 Havoc Pennington <hp@pobox.com>
7356 This doesn't compile yet, but syncing up so I can hack on it from
7357 work. What are branches for if not broken code? ;-)
7359 * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
7360 DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
7361 DBUS_HEADER_FIELD_ERROR_NAME
7363 * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
7364 for the interface+member pairs
7365 (string_hash): change to use g_str_hash algorithm
7366 (find_direct_function, find_string_function): refactor these to
7369 * dbus/dbus-message.c: port all of this over to support
7370 interface/member fields instead of name field
7372 * dbus/dbus-object-registry.c: port over
7374 * dbus/dbus-string.c (_dbus_string_validate_interface): rename
7375 from _dbus_string_validate_name
7377 * bus/dbus-daemon-1.1: change file format for the
7378 <deny>/<allow> stuff to match new message naming scheme
7380 * bus/policy.c: port over
7382 * bus/config-parser.c: parse new format
7384 2003-08-16 Havoc Pennington <hp@pobox.com>
7386 * dbus/dbus-object-registry.c (add_and_remove_objects): remove
7389 * glib/dbus-gproxy.c: some hacking
7391 2003-08-15 Havoc Pennington <hp@redhat.com>
7393 * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
7395 * dbus/dbus-connection.c
7396 (dbus_connection_send_with_reply_and_block): factor out internals;
7397 change to convert any error replies to DBusError instead of
7398 returning them as a message
7400 2003-08-15 Havoc Pennington <hp@pobox.com>
7402 * dbus/dbus-connection.c,
7403 dbus/dbus-pending-call.c: Finish the pending call stuff
7405 2003-08-14 Havoc Pennington <hp@redhat.com>
7407 * dbus/dbus-pending-call.c: start on new object that will replace
7408 DBusMessageHandler and ReplyHandlerData for tracking outstanding
7411 * dbus/dbus-gproxy.c: start on proxy object used to communicate
7412 with remote interfaces
7414 * dbus/dbus-gidl.c: do the boring boilerplate in here
7416 2003-08-12 Havoc Pennington <hp@pobox.com>
7418 * bus/dispatch.c (bus_dispatch): make this return proper
7419 DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
7421 * dbus/dbus-errors.c (dbus_set_error): use
7422 _dbus_string_append_printf_valist
7424 * dbus/dbus-string.c (_dbus_string_append_printf_valist)
7425 (_dbus_string_append_printf): new
7427 * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
7430 * dbus/dbus-connection.c (dbus_connection_dispatch): handle
7431 DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
7432 message is unhandled.
7434 2003-08-11 Havoc Pennington <hp@pobox.com>
7436 * bus/test.c (client_disconnect_handler): change to return
7437 HANDLED (would have been REMOVE_MESSAGE)
7439 * dbus/dbus-object.h (enum DBusHandlerResult): rename to
7440 HANDLED/NOT_YET_HANDLED instead of
7441 REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it
7444 2003-08-10 Havoc Pennington <hp@pobox.com>
7446 * tools/dbus-send.c (main): add --type argument, for now
7447 supporting only method_call and signal types.
7449 * tools/dbus-print-message.c: print message type
7451 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7452 init connection->objects
7454 * doc/dbus-specification.sgml: fix sgml
7456 * bus/*.c: port over to object-instance API changes
7458 * test/test-service.c: ditto
7460 * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
7461 name, we will have to fix up the rest of the code to also handle
7463 (dbus_message_new): generic message-creation call
7464 (set_string_field): allow appending name field
7466 2003-08-06 Havoc Pennington <hp@pobox.com>
7468 * dbus/dbus-object-registry.c: implement signal connection
7471 * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
7473 * dbus/dbus-internals.c (_dbus_memdup): new function
7475 2003-08-02 Havoc Pennington <hp@pobox.com>
7477 * dbus/dbus-message.c (dbus_message_get_no_reply)
7478 (dbus_message_set_no_reply): add these and remove
7479 set_is_error/get_is_error
7481 * dbus/dbus-protocol.h, doc/dbus-specification.sgml:
7482 remove the ERROR flag, since there's now an ERROR type
7484 2003-08-01 Havoc Pennington <hp@pobox.com>
7486 * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
7489 * dbus/dbus-message.c (dbus_message_get_type): new function
7491 * doc/dbus-specification.sgml: add "type" byte to messages
7493 2003-08-01 Havoc Pennington <hp@pobox.com>
7495 * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
7496 a message type enum to distinguish kinds of message
7497 (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message
7498 that need not be replied to
7500 2003-08-01 Havoc Pennington <hp@pobox.com>
7502 * dbus/dbus-marshal.c: adapt to DBusObjectID changes
7503 (unpack_8_octets): fix no-64-bit-int bug
7505 * dbus/dbus-object-registry.c (validate_id): validate the
7506 connection ID bits, not just the instance ID.
7508 * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
7509 the connection-global 33 bits of the object ID
7511 * dbus/dbus-object-registry.c (info_from_entry): fill in
7512 object ID in the new way
7514 * dbus/dbus-objectid.h: rather than high/low bits, specifically
7515 define server/client/instance bits.
7517 2003-07-30 Havoc Pennington <hp@pobox.com>
7519 * dbus/dbus-connection.c (dbus_connection_register_object): fix
7522 2003-07-13 Havoc Pennington <hp@pobox.com>
7524 * dbus/dbus-object.h (struct DBusObjectVTable): add padding
7525 fields to DBusObjectVTable and DBusObjectInfo
7527 2003-07-12 Havoc Pennington <hp@pobox.com>
7529 * dbus/dbus-object-registry.c: implement unit test,
7530 fix bugs discovered in process
7532 * dbus/dbus-connection.c: remove handler_table and
7533 register_handler(), add DBusObjectRegistry usage
7535 * dbus/dbus-objectid.c (dbus_object_id_is_null)
7536 (dbus_object_id_set_null): new functions
7538 2003-07-08 Havoc Pennington <hp@pobox.com>
7540 * dbus/dbus-object.c: implement some of this
7542 * dbus/dbus-object-registry.c
7543 (_dbus_object_registry_add_and_unlock): fill in the object_id out
7545 (_dbus_object_registry_new): handle OOM
7547 2003-07-08 Havoc Pennington <hp@pobox.com>
7549 * dbus/dbus-object.h: sketch out an API for registering objects
7550 with a connection, that allows us to use as little as 24 bytes
7551 per object and lets application code represent an object in
7552 any conceivable way.
7554 * dbus/dbus-object-registry.c: implement the hard bits of the
7555 DBusConnection aspect of object API. Not yet wired up.
7557 2003-07-06 Havoc Pennington <hp@pobox.com>
7559 * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
7560 (_dbus_marshal_object_id): new
7561 (_dbus_demarshal_object_id): new
7562 (_dbus_marshal_get_arg_end_pos): support object ID type, and
7563 consolidate identical switch cases. Don't conditionalize handling
7564 of DBUS_TYPE_UINT64, need to handle the type always.
7565 (_dbus_marshal_validate_arg): consolidate identical cases, and
7566 handle DBUS_TYPE_OBJECT_ID
7568 * dbus/dbus-objectid.c: new file with DBusObjectID data type.
7570 * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
7572 2003-09-28 Havoc Pennington <hp@pobox.com>
7576 2003-09-28 Havoc Pennington <hp@pobox.com>
7578 * doc/Makefile.am (dbus-specification.html): testing a funky hack
7579 to work with Debian db2html
7581 2003-09-28 Havoc Pennington <hp@pobox.com>
7583 * configure.in: 0.13
7585 * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
7586 stylesheet-images for benefit of Debian
7588 Change back to using filesystem-linked sockets for the system
7589 bus, so only root can create the default system bus address.
7591 * bus/system.conf.in: change to use
7592 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7594 * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
7597 * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
7598 here, and AC_DEFINE DBUS_SYSTEM_PATH
7600 2003-08-09 Anders Carlsson <andersca@codefactory.se>
7603 * doc/busconfig.dtd:
7606 2003-08-09 Anders Carlsson <andersca@codefactory.se>
7608 * doc/dbus-specification.sgml:
7609 Add activation reply values.
7611 2003-08-05 Havoc Pennington <hp@redhat.com>
7613 * configure.in: 0.12
7615 2003-08-05 Anders Carlsson <andersca@codefactory.se>
7617 * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
7618 (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
7619 (add_watch), (remove_watch), (create_source):
7620 Refcount fds, fixes some reentrancy issues.
7622 2003-07-30 Havoc Pennington <hp@redhat.com>
7624 * dbus/dbus-bus.c (init_connections_unlocked): fix default system
7625 bus address to be abstract if we have abstract sockets
7629 2003-07-28 Havoc Pennington <hp@redhat.com>
7631 * bus/messagebus.in: fix to avoid processname/servicename
7632 confusion, from Michael Kearey
7633 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
7635 2003-07-23 Havoc Pennington <hp@pobox.com>
7637 * dbus/dbus-message.c (dbus_message_iter_get_named):
7638 fix from Andy Hanton to remove broken "+1"
7640 2003-07-16 Havoc Pennington <hp@pobox.com>
7642 * tools/dbus-launch.c (babysit): close stdout/stderr in the
7643 babysitter process, as suggested by Thomas Leonard, so
7644 an "eval `dbus-launch --exit-with-session`" will actually
7647 2003-07-16 Havoc Pennington <hp@pobox.com>
7649 * configure.in: print out EXPANDED_* variables in the summary at
7650 the end; clean up the code that computes EXPANDED_ variables and
7651 get the ones using exec_prefix right. Should make things work
7652 when you build without --prefix
7654 2003-06-29 Havoc Pennington <hp@pobox.com>
7656 * mono/Test.cs (class Test): fire up a main loop and run it
7658 * mono/DBus.cs (DBus): don't g_thread_init since it can only be
7659 done once, the app has to do it
7661 2003-06-26 Havoc Pennington <hp@pobox.com>
7663 * mono/Connection.cs: set up connection with the glib main loop
7665 2003-07-01 Havoc Pennington <hp@redhat.com>
7667 * doc/dbus-specification.sgml: clarify the format of a type code,
7668 change suggested by Jim Blandy
7670 2003-06-29 Miloslav Trmac <mitr@volny.cz>
7673 * tools/Makefile.am: Don't assume srcdir == builddir.
7675 * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
7676 the allocated block.
7677 (_dbus_memory_test): New function.
7678 * dbus/dbus-test.h: Add _dbus_memory_test ().
7679 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
7681 * dbus/dbus-message.c (decode_header_data): Use %.4s instead
7683 (dbus_message_new): Remove obsolete @todo.
7685 * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
7686 (_dbus_marshal_set_uint64): Fix comment.
7688 * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
7689 hardcode FIELD_REPLY_SERIAL.
7691 * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
7692 (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
7694 * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
7695 and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
7697 2003-06-24 Havoc Pennington <hp@pobox.com>
7699 * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
7701 2003-06-23 Anders Carlsson <andersca@codefactory.se>
7707 * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
7708 * gcj/org/.cvsignore:
7709 * gcj/org/Makefile.am:
7710 * gcj/org/freedesktop/.cvsignore:
7711 * gcj/org/freedesktop/Makefile.am:
7712 * gcj/org/freedesktop/dbus/.cvsignore:
7713 * gcj/org/freedesktop/dbus/Makefile.am:
7714 * gcj/org/freedesktop/dbus/Message.java: (Message),
7716 * gcj/org/freedesktop/dbus/natMessage.cc:
7717 Fix the build system.
7719 2003-06-22 Havoc Pennington <hp@pobox.com>
7721 * mono/Connection.cs: add more bindings
7723 * dbus/dbus-threads.c (dbus_threads_init): allow calling this
7726 2003-06-22 Havoc Pennington <hp@pobox.com>
7728 * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
7729 Start wrapping more stuff.
7731 2003-06-22 Havoc Pennington <hp@pobox.com>
7733 * mono/Message.cs: implement Message.Wrap() that ensures we only
7734 have a single C# wrapper per DBusMessage, assuming it works which
7735 it probably doesn't.
7737 * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
7738 (dbus_message_free_data_slot): new
7739 (dbus_message_set_data): new
7740 (dbus_message_get_data): new
7742 2003-06-22 Havoc Pennington <hp@pobox.com>
7744 * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
7745 (_dbus_data_slot_allocator_alloc): rework these to keep a
7746 reference count on each slot and automatically manage a global
7747 slot ID variable passed in by address
7749 * bus/bus.c: convert to new dataslot API
7751 * dbus/dbus-bus.c: convert to new dataslot API
7753 * dbus/dbus-connection.c: convert to new dataslot API
7755 * dbus/dbus-server.c: convert to new dataslot API
7757 * glib/dbus-gmain.c: ditto
7761 * bus/connection.c: ditto
7763 2003-06-22 Anders Carlsson <andersca@codefactory.se>
7765 * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
7766 after the gcj checks so that the correct configuration tags
7767 will be added to libtool.
7769 * dbus-glib-1.pc.in: No need to specify any includes since
7770 dbus-1.pc.in has those.
7772 2003-06-22 Havoc Pennington <hp@pobox.com>
7774 * mono/*, gcj/*, configure.in, Makefile.am:
7775 Check in makefiles and subdirs for mono and gcj bindings.
7776 Neither binding actually exists, just trying to get through
7777 all the build and other boring bits.
7779 2003-06-21 Philip Blundell <philb@gnu.org>
7781 * tools/dbus-monitor.1: Updated.
7783 * tools/dbus-send.1: Likewise.
7785 2003-06-20 Anders Carlsson <andersca@codefactory.se>
7787 * dbus/dbus-transport-unix.c (unix_handle_watch): Check
7788 for hangup and error after checking read so we won't discard
7789 pending data if both hangup and read are set.
7791 2003-06-19 Philip Blundell <philb@gnu.org>
7793 * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
7795 * tools/dbus-send.c: Accept both --system and --session.
7797 * tools/dbus-monitor.c: Same here.
7799 2003-06-19 Anders Carlsson <andersca@codefactory.se>
7801 * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
7802 from C++ (Patch by Miloslav Trmac).
7804 2003-06-15 Joe Shaw <joe@assbarn.com>
7806 * configure.in: Check for socklen_t.
7808 * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
7810 * test/test-segfault.c: Add #include <sys/time.h>
7812 * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
7813 dbus-launch needs it.
7815 2003-06-09 Havoc Pennington <hp@redhat.com>
7817 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
7818 SUN_LEN, it breaks abstract socket usage
7820 * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
7823 2003-06-04 Havoc Pennington <hp@pobox.com>
7825 * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
7826 using unix:abstract=/foo, and when listening in a tmpdir
7827 i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
7829 * dbus/dbus-transport.c (_dbus_transport_open): support
7832 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
7833 support abstract sockets
7835 * dbus/dbus-transport-unix.c
7836 (_dbus_transport_new_for_domain_socket): support abstract sockets
7838 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
7839 toggle as an argument, implement abstract namespace support
7840 (_dbus_listen_unix_socket): ditto
7842 * configure.in: add --enable-abstract-sockets and implement
7843 a configure check for autodetection of the right value.
7845 2003-06-01 Havoc Pennington <hp@pobox.com>
7847 * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
7848 in /tmp (though on Linux this will end up being useless,
7849 when we add abstract namespace support)
7851 * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
7854 2003-05-28 Colin Walters <walters@verbum.org>
7856 * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
7858 2003-05-18 Anders Carlsson <andersca@codefactory.se>
7860 * dbus/dbus-message.c (dbus_message_new): Remove @todo.
7862 2003-05-17 Colin Walters <walters@gnu.org>
7864 * tools/dbus-send.c: Don't exit with an error code if --help was
7865 passed. Default to using the session bus instead of the system
7868 * tools/dbus-launch.c: Ditto.
7870 * tools/dbus-monitor.c: Ditto.
7872 * tools/dbus-send.1: Update with new arguments.
7874 * tools/dbus-launch.c: Emit code to export variables. New
7875 arguments -s and -c to specify shell syntax, and a bit of code to
7876 autodetect syntax. Also, allow specifying a program to run.
7878 * tools/dbus-launch.1: Update with new arguments.
7880 * tools/dbus-send.1: Ditto.
7882 * tools/dbus-monitor.1: Ditto.
7884 2003-05-17 Havoc Pennington <hp@pobox.com>
7886 * bus/config-parser.c (merge_included): merge in policies from
7887 child configuration file.
7889 * bus/policy.c (bus_policy_merge): function to merge two policies
7892 2003-05-16 Havoc Pennington <hp@redhat.com>
7894 * dbus/dbus-connection.c: disable verbose lock spew
7896 * tools/dbus-send.c: add --print-reply command line option
7898 * tools/dbus-print-message.h (print_message): new util function
7899 shared by dbus-send and dbus-monitor
7901 * tools/dbus-monitor.c (handler_func): exit on disconnect
7903 * dbus/dbus-transport-unix.c (do_reading): if the transport is
7904 disconnected, don't try to use the read_watch
7906 * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
7907 so we can find this bug more easily
7909 2003-05-16 Havoc Pennington <hp@redhat.com>
7911 * bus/policy.c (free_rule_list_func): avoid a crash when passed
7912 NULL as DBusHashTable is annoyingly likely to do.
7914 2003-05-16 Colin Walters <walters@verbum.org>
7916 * tools/dbus-monitor.c: Add --session argument and usage()
7919 * tools/dbus-monitor.1: Update with new --session arg.
7921 * bus/Makefile.am (install-data-hook): Create
7922 $(libdir)/dbus-1.0/services so that the session bus is happy.
7924 2003-05-15 Havoc Pennington <hp@redhat.com>
7926 * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
7927 on non-x86. ifdef's are evil.
7929 2003-05-15 Havoc Pennington <hp@redhat.com>
7931 * configure.in: 0.11
7935 * bus/Makefile.am (initddir): apparently we are supposed to put
7936 init scripts in /etc/rc.d/init.d not /etc/init.d
7938 * bus/Makefile.am: remove the "you must --enable-tests to make
7939 check" as it broke distcheck
7941 * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
7943 2003-05-13 James Willcox <jwillcox@gnome.org>
7946 * bus/activation.c: (bus_activation_service_created),
7947 (bus_activation_activate_service):
7948 * bus/driver.c: (bus_driver_send_service_deleted),
7949 (bus_driver_send_service_created), (bus_driver_send_service_lost),
7950 (bus_driver_send_service_acquired),
7951 (bus_driver_send_welcome_message),
7952 (bus_driver_handle_list_services):
7953 * bus/session.conf.in:
7954 * dbus/dbus-bus.c: (dbus_bus_acquire_service),
7955 (dbus_bus_service_exists), (dbus_bus_activate_service):
7958 Add some convenience API which lets you activate a service, and did a
7959 bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
7960 and dbus_message_get_args()
7962 2003-05-11 Havoc Pennington <hp@pobox.com>
7964 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
7965 calling _dbus_marshal_validate_arg() for every byte in a byte
7968 * dbus/dbus-message-handler.c: use atomic reference counting to
7969 reduce number of locks slightly; the global lock in here sucks
7971 * dbus/dbus-connection.c
7972 (_dbus_connection_update_dispatch_status_and_unlock): variant of
7973 update_dispatch_status that can be called with lock held; then use
7974 in a couple places to reduce locking/unlocking
7975 (dbus_connection_send): hold the lock over the whole function
7976 instead of acquiring it twice.
7978 * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
7980 * bus/connection.c (bus_connections_setup_connection): fix access
7981 to already-freed memory.
7983 * dbus/dbus-connection.c: keep a little cache of linked list
7984 nodes, to avoid using the global linked list alloc lock in the
7985 normal send-message case. Instead we just use the connection lock
7986 that we already have to take.
7988 * dbus/dbus-list.c (_dbus_list_find_last): new function
7990 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
7991 change to use a struct for the atomic type; fix docs,
7992 they return value before increment, not after increment.
7994 * dbus/dbus-string.c (_dbus_string_append_4_aligned)
7995 (_dbus_string_append_8_aligned): new functions to try to
7996 microoptimize this operation.
7997 (reallocate_for_length): break this out of set_length(), to
7998 improve profile info, and also so we can consider inlining the
8001 * dbus/dbus-message.c (dbus_message_new_empty_header): init data
8002 strings with some preallocation, cuts down on our calls to realloc
8003 a fair bit. Though if we can get the "move entire string to empty
8004 string" optimization below to kick in here, it would be better.
8006 * dbus/dbus-string.c (_dbus_string_move): just call
8007 _dbus_string_move_len
8008 (_dbus_string_move_len): add a special case for moving
8009 an entire string into an empty string; we can just
8010 swap the string data instead of doing any reallocs.
8011 (_dbus_string_init_preallocated): new function
8013 2003-05-11 Havoc Pennington <hp@pobox.com>
8015 Write a "test-profile" that does echo client-server with threads;
8016 profile reveals lock contention, memcpy/realloc of buffers, and
8017 UTF-8 validation as hot spots. 20% of lock contention eliminated
8018 with dbus_atomic_inc/dec implementation on x86. Much remaining
8019 contention is global mempool locks for GList and DBusList.
8021 * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
8024 * dbus/dbus-connection.c (struct DBusConnection): use
8025 dbus_atomic_t for the reference count
8027 * dbus/dbus-message.c (struct DBusMessage): declare
8028 dbus_atomic_t values as volatile
8030 * configure.in: code to detect ability to use atomic integer
8031 operations in assembly, from GLib patch
8033 * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
8034 time, tired of it being wrong in threads and forked processes
8036 * glib/test-profile.c: a little program to bounce messages back
8037 and forth between threads and eat CPU
8039 * dbus/dbus-connection.c: add debug spew macros for debugging
8040 thread locks; include config.h at top; fix deadlock in
8041 dbus_connection_flush()
8043 2003-05-08 Havoc Pennington <hp@pobox.com>
8045 * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
8046 data from getting written, and there wasn't a good reason to
8049 * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
8050 dbus_verbose lines in test coverage
8051 (main): add list of functions sorted by # of untested blocks
8052 to the coverage report
8054 * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
8056 * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
8058 * dbus/dbus-message-handler.c (_dbus_message_handler_test):
8059 extend test coverage
8061 * test/data/auth/cancel.auth-script: test canceling an
8064 * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
8065 aren't used. in CVS history if we end up needing them.
8067 2003-05-04 Havoc Pennington <hp@pobox.com>
8069 * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
8072 * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
8073 function, which assumed length was in # of strings, not bytes
8075 * dbus/dbus-message.c (_dbus_message_test): add tests for some
8078 * dbus/dbus-connection.c
8079 (_dbus_connection_queue_received_message): disable function for
8080 now, we are only using it in test mode
8082 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
8083 remove a mistaken FIXME
8085 2003-05-04 Havoc Pennington <hp@pobox.com>
8087 * dbus/dbus-connection.c (dbus_connection_preallocate_send):
8088 unlock mutex on successful return, patch from Anders Gustafsson
8090 2003-05-04 Havoc Pennington <hp@pobox.com>
8092 * dbus-glib-1.pc.in (Requires): fix dependencies, from
8095 2003-05-04 Havoc Pennington <hp@pobox.com>
8097 * tools/dbus-launch.c: implement
8099 * bus/main.c (main), bus/bus.c (bus_context_new):
8100 implement --print-pid and --fork
8102 2003-05-03 Havoc Pennington <hp@redhat.com>
8104 * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
8105 the address had no value, and add to test suite. Fix and
8106 regression test from Miloslav Trmac
8108 2003-05-03 Havoc Pennington <hp@pobox.com>
8110 * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
8111 watch is invalid when handled
8113 * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
8114 dbus-launch utility to launch the bus from a shell script. Didn't
8115 actually implement dbus-launch yet, it's just a placeholder still.
8117 2003-05-03 Havoc Pennington <hp@pobox.com>
8119 * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
8120 daemon; also documents daemon config file, so replaces
8121 doc/config-file.txt. Corrected some stuff from config-file.txt in
8122 the process of moving it.
8124 2003-05-03 Havoc Pennington <hp@pobox.com>
8126 * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
8129 2003-05-03 Colin Walters <walters@verbum.org>
8131 * dbus/dbus-sysdeps.c (fill_user_info): Test against
8132 DBUS_UID_UNSET to determine whether to do a uid lookup or not.
8134 * Makefile.am: Update to use new .pc versioning scheme.
8136 2003-05-02 Havoc Pennington <hp@redhat.com>
8138 * bus/system.conf.in: allow send/receive to/from message bus
8141 2003-04-30 Havoc Pennington <hp@redhat.com>
8143 * configure.in: print a note when building with unit tests and
8146 2003-04-30 Havoc Pennington <hp@redhat.com>
8148 * Makefile.am: add a check-local that complains if you didn't
8149 configure with --enable-tests
8151 2003-04-29 Havoc Pennington <hp@redhat.com>
8153 * glib/dbus-gmain.c: docs cleanups
8155 * dbus/dbus-types.h: add docs on int64 types
8157 * dbus/dbus-memory.c: fix docs to avoid putting private API in
8158 public API docs section
8160 2003-04-29 Havoc Pennington <hp@redhat.com>
8162 * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
8163 dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
8164 parallel install API version, not with the D-BUS package version.
8166 * HACKING: move some of README over here
8168 * README: updates, and document API/ABI policy
8170 * configure.in: reindentation
8172 2003-04-29 Havoc Pennington <hp@redhat.com>
8174 * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
8175 to use this library" to be sure people have the right
8178 2003-04-28 Havoc Pennington <hp@redhat.com>
8180 * configure.in: add --enable-docs which by default is auto yes if
8181 doxygen and db2html found, no otherwise; but can be forced on/off
8183 * doc/Makefile.am: conditionalize whether to build docs on
8186 2003-04-28 Havoc Pennington <hp@redhat.com>
8188 * configure.in: 0.10
8192 * bus/system.conf.in: add <includedir>system.d</includedir>
8194 * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
8195 username was provided but not uid
8197 * bus/config-parser.c (struct BusConfigParser): keep track of
8198 whether the parser is toplevel or was included; change some
8199 of the error handling if it's included.
8201 2003-04-27 Havoc Pennington <hp@pobox.com>
8205 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
8206 report correct status if we finish processing authentication
8207 inside this function.
8209 * bus/activation.c (try_send_activation_failure): use
8210 bus_transaction_send_error_reply
8212 * bus/connection.c (bus_connection_get_groups): return an error
8213 explaining the problem
8215 * bus/bus.c (bus_context_check_security_policy): implement
8216 restriction here that inactive connections can only send the
8217 hello message. Also, allow bus driver to send anything to
8220 * bus/connection.c (bus_connection_complete): create the
8221 BusClientPolicy here instead of on-demand.
8222 (bus_connection_get_policy): don't return an error
8224 * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
8225 sender field in message being replied to
8227 * bus/bus.c (bus_context_check_security_policy): fix silly typo
8228 causing it to return FALSE always
8230 * bus/policy.c (bus_client_policy_check_can_send): fix bug where
8231 we checked sender rather than destination
8233 2003-04-25 Havoc Pennington <hp@redhat.com>
8235 test suite is slightly hosed at the moment, will fix soon
8237 * bus/connection.c (bus_connections_expire_incomplete): fix to
8238 properly disable the timeout when required
8239 (bus_connection_set_name): check whether we can remove incomplete
8240 connections timeout after we complete each connection.
8242 * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
8243 probably still broken.
8245 * bus/services.c (bus_registry_acquire_service): implement max
8246 number of services owned, and honor allow/deny rules on which
8247 services a connection can own.
8249 * bus/connection.c (bus_connection_get_policy): report errors here
8251 * bus/activation.c: implement limit on number of pending
8254 2003-04-25 Havoc Pennington <hp@redhat.com>
8256 * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
8257 where we used >= 0 instead of != DBUS_UID_UNSET.
8259 2003-04-25 Havoc Pennington <hp@redhat.com>
8261 * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
8262 were toggled without add/remove, fix from Anders Gustafsson
8264 2003-04-24 Havoc Pennington <hp@redhat.com>
8266 * test/data/valid-config-files/basic.conf: add <limit> tags to
8269 * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
8270 <limit> tag in configuration file.
8272 2003-04-24 Havoc Pennington <hp@redhat.com>
8274 * bus/dispatch.c: somehow missed some name_is
8276 * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
8277 (_dbus_timeout_set_interval): new
8279 * bus/connection.c (bus_connections_setup_connection): record time
8280 when each connection is first set up, and expire them after the
8281 auth timeout passes.
8283 2003-04-24 Havoc Pennington <hp@redhat.com>
8285 * dbus/dbus-message.c (dbus_message_name_is): rename
8286 (dbus_message_service_is): rename
8287 (dbus_message_sender_is): rename
8288 (dbus_message_get_service): rename
8290 2003-04-24 Havoc Pennington <hp@redhat.com>
8292 * configure.in: add --enable-checks
8294 * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
8296 * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
8297 to use thread locks.
8298 (_dbus_connection_handler_destroyed_locked): move some private
8299 functions into proper docs group
8301 * dbus/dbus-internals.h: add _dbus_return_if_fail,
8302 _dbus_return_val_if_fail
8304 Throughout: use dbus_return_if_fail
8306 2003-04-23 James Willcox <jwillcox@gnome.org>
8309 * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
8310 (dbus_connection_setup_with_g_main),
8311 (dbus_server_setup_with_g_main):
8312 * glib/test-dbus-glib.c: (main):
8313 * glib/test-thread-client.c: (main):
8314 * glib/test-thread-server.c: (new_connection_callback), (main):
8315 * tools/dbus-monitor.c: (main):
8317 Added a GMainContext argument to dbus_connection_setup_with_g_main()
8318 and dbus_server_setup_with_g_main().
8320 2003-04-20 Havoc Pennington <hp@pobox.com>
8322 * doc/dbus-specification.sgml: document the restrictions on
8323 message and service names
8325 2003-04-22 Havoc Pennington <hp@redhat.com>
8327 * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
8328 support, and do some code cleanups to share more code and
8329 speed up array marshal/demarshal.
8331 * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
8333 * configure.in: generate dbus-arch-deps.h
8335 * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
8338 2003-04-22 Havoc Pennington <hp@redhat.com>
8340 * test/data/valid-messages/opposite-endian.message: fix test
8341 to use proper type for rply field
8343 * test/data/invalid-messages: add tests for below validation
8345 * dbus/dbus-message.c (decode_header_data): validate field types,
8346 and validate that named fields are valid names
8347 (decode_name_field): consider messages in the
8348 org.freedesktop.Local. namespace to be invalid.
8350 * dbus/dbus-string.c (_dbus_string_validate_name): new
8352 2003-04-19 Havoc Pennington <hp@pobox.com>
8354 * bus/driver.c (bus_driver_handle_hello): check limits and
8355 return an error if they are exceeded.
8357 * bus/connection.c: maintain separate lists of active and inactive
8358 connections, and a count of each. Maintain count of completed
8359 connections per user. Implement code to check connection limits.
8361 * dbus/dbus-list.c (_dbus_list_unlink): export
8363 * bus/bus.c (bus_context_check_security_policy): enforce a maximum
8364 number of bytes in the message queue for a connection
8366 2003-04-18 Havoc Pennington <hp@pobox.com>
8368 * dbus/dbus-auth.c (record_mechanisms): memleak fixes
8370 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
8373 * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
8374 on realloc be sure to update the pointer in the keyring
8376 * dbus/dbus-string.c (_dbus_string_zero): compensate for align
8377 offset to avoid writing to unallocated memory
8379 * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
8380 try the next mechanism, so we properly handle OOM
8382 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
8384 (_dbus_keyring_new): fix OOM bug
8385 (_dbus_keyring_new_homedir): always set error; impose a maximum
8386 number of keys we'll load from the file, mostly to speed up the
8387 test suite and make its OOM checks more useful, but also for
8390 * dbus/dbus-auth.c (process_error_server): reject authentication
8391 if we get an error from the client
8392 (process_cancel): on cancel, send REJECTED, per the spec
8393 (process_error_client): send CANCEL if we get an error from the
8396 2003-04-18 Havoc Pennington <hp@pobox.com>
8398 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
8401 * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
8404 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
8405 about DBUS_TEST_HOMEDIR once
8407 * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
8410 * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
8411 config file so we test the right thing
8413 Throughout: assorted docs improvements
8415 2003-04-18 Havoc Pennington <hp@pobox.com>
8417 * glib/dbus-gmain.c: adapt to watch changes
8419 * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
8421 * dbus/dbus-server.h: remove dbus_server_handle_watch
8423 * dbus/dbus-connection.h: remove dbus_connection_handle_watch
8425 * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
8426 like DBusTimeout, so we don't need dbus_connection_handle_watch
8429 2003-04-17 Havoc Pennington <hp@redhat.com>
8431 * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
8432 database usage so it all goes via the DBusUserDatabase cache.
8434 2003-04-17 Havoc Pennington <hp@redhat.com>
8436 * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
8437 there was an OOM watch we skipped, we always return TRUE so we
8438 iterate again to have a look at it again. Fixes test suite hang.
8439 Code rearrangement also lets us lose some memset and only iterate
8440 over callbacks once.
8442 * bus/driver.c (bus_driver_handle_message): sense of test for
8445 2003-04-16 Havoc Pennington <hp@pobox.com>
8447 * doc/dbus-specification.sgml: make spec say serials are unsigned
8449 * dbus/dbus-message.h: change message serials to unsigned
8451 * dbus/dbus-connection.c: adapt to message serials being unsigned
8453 2003-04-15 Havoc Pennington <hp@pobox.com>
8455 * bus/bus.c: create and keep around a shared DBusUserDatabase
8458 * bus/connection.c (bus_connection_get_groups): don't cache
8459 groups for user in the connection object, since user database
8460 object now does that.
8462 2003-04-16 Havoc Pennington <hp@redhat.com>
8464 * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
8465 list of size counters
8466 (_dbus_message_loader_putback_message_link): put back a popped link
8468 * dbus/dbus-connection.c
8469 (dbus_connection_set_max_live_messages_size): rename
8471 (dbus_connection_get_outgoing_size): get size of outgoing
8473 (_dbus_connection_set_connection_counter): remove this cruft
8475 2003-04-14 Havoc Pennington <hp@redhat.com>
8477 * dbus/dbus-userdb.c: user database abstraction, mostly to get
8478 caching, but at some point we might want to be able to use a
8481 * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
8482 SHA1 conf file to test the sha1 auth mechanism, since the regular
8483 test always uses EXTERNAL when available.
8486 test/data/valid-config-files/debug-allow-all-sha1.conf.in:
8487 add conf file that requires use of sha1 auth
8489 2003-04-13 Havoc Pennington <hp@pobox.com>
8491 * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
8492 from Philip Blundell to send messages and monitor them.
8494 2003-04-13 Havoc Pennington <hp@pobox.com>
8496 * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
8499 * test/data/valid-config-files/debug-allow-all.conf.in: allow all
8502 * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
8503 fix to only recover unused bytes if we're already authenticated
8504 (_dbus_transport_get_is_authenticated): fix to still mark us
8505 authenticated if there are unused bytes.
8507 * bus/dispatch.c: implement security policy checking
8509 * bus/connection.c (bus_transaction_send_from_driver): new
8511 * bus/bus.c (bus_context_check_security_policy): new
8513 * bus/dispatch.c (send_service_nonexistent_error): delete this,
8514 now we just set the DBusError and it gets converted to an error
8517 * bus/connection.c (allow_user_function): enable code using actual
8518 data from the config file
8520 * bus/policy.c (list_allows_user): handle wildcard rules for
8521 user/group connection perms
8523 2003-04-13 Havoc Pennington <hp@pobox.com>
8525 * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
8527 * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
8529 * bus/policy.c (bus_policy_append_mandatory_rule)
8530 (bus_policy_append_default_rule, bus_policy_append_user_rule)
8531 (bus_policy_append_group_rule): new functions
8533 2003-04-12 Havoc Pennington <hp@pobox.com>
8535 * bus/config-parser.c (bus_config_parser_new): fix a memleak
8537 * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
8538 the pid/gid/uid, just for paranoia.
8540 * test/break-loader.c (randomly_do_n_things): find a byte
8541 containing a type code, and randomly change it to a different
8544 2003-04-12 Havoc Pennington <hp@pobox.com>
8546 * bus/policy.h: change BusPolicy to be the thing from the config
8547 file, and rename old BusPolicy to BusClientPolicy
8549 * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
8550 match change in how policy works
8552 * dbus/dbus-internals.h: mark assert_not_reached as
8553 __attribute((noreturn))__
8555 2003-04-11 Havoc Pennington <hp@redhat.com>
8557 * doc/dbus-specification.sgml: fix a spot with the wrong name for
8558 the broadcast service. Use boolean return for ServiceExists.
8560 2003-04-11 Havoc Pennington <hp@redhat.com>
8562 * configure.in: add another directory to look for qt in.
8564 2003-04-11 Havoc Pennington <hp@redhat.com>
8566 * AUTHORS: add Colin Walters
8568 2003-04-11 Havoc Pennington <hp@redhat.com>
8574 2003-04-11 Havoc Pennington <hp@redhat.com>
8576 * bus/messagebus.in: remove pid file when stopping the
8577 message bus, since the bus won't have privileges to remove it
8580 2003-04-11 Havoc Pennington <hp@redhat.com>
8582 * bus/bus.c (bus_context_new): move credentials change after
8585 2003-04-11 Havoc Pennington <hp@pobox.com>
8587 * test/decode-gcov.c: add "below average functions" to the
8588 coverage report, and change how some of the code works.
8590 * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
8591 not in the coverage stats.
8593 * test/test-service.c (main): use _dbus_verbose not fprintf in a
8594 couple places so running the test suite doesn't result in megaspam.
8596 2003-04-11 Havoc Pennington <hp@pobox.com>
8598 * bus/dispatch.c (check_existent_service_activation): accept a no
8599 memory error in a place we didn't before
8601 * bus/test.c (bus_test_run_everything): remove hacky "do it twice
8602 in case the first one failed," since the test suite is less
8605 2003-04-10 Havoc Pennington <hp@pobox.com>
8607 * bus/dispatch.c (check_segfault_service_activation): add test
8608 for launching an executable that just crashes.
8610 * test/test-segfault.c (main): try setting coredumpsize to 0 so we
8611 don't leave a million cores. We'll see how portable this is.
8613 2003-04-10 Havoc Pennington <hp@pobox.com>
8615 * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
8616 the possible parent failures before we fork, so that we don't
8617 fail to create a babysitter after creating the child.
8619 * bus/activation.c (bus_activation_activate_service): kill child
8620 if we don't successfully complete the activation.
8622 2003-04-10 Havoc Pennington <hp@redhat.com>
8624 * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
8625 the connection if it's disconnected
8627 * bus/activation.c (bus_activation_service_created): use new
8628 transaction features to roll back removal of pending activation if
8629 we don't successfully create the service after all. Don't remove
8630 pending activation if the function fails.
8632 * dbus/dbus-list.c (_dbus_list_insert_before_link)
8633 (_dbus_list_insert_after_link): new code to facilitate
8636 * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
8637 new functionality, so we can preallocate the ability to insert
8640 * bus/connection.c (bus_transaction_add_cancel_hook): new function
8641 allowing us to put custom hooks in a transaction to be used for
8642 cancelling said transaction
8644 * doc/dbus-specification.sgml: add some discussion of secondary
8645 service owners, and disallow zero-length service names
8647 * bus/services.c (bus_registry_acquire_service): new function,
8648 splits out part of bus_driver_handle_acquire_service() and fixes
8649 a bug where we didn't remove the service doing the acquiring
8650 from the secondary queue if we failed to remove the current owner
8651 from the front of the queue.
8653 2003-04-10 Alexander Larsson <alexl@redhat.com>
8655 * doc/dbus-specification.sgml:
8656 s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
8658 2003-04-10 Alexander Larsson <alexl@redhat.com>
8663 Added files to cvsignore
8665 * dbus/dbus-message.h:
8666 * dbus/dbus-message.c: (dbus_message_iter_get_named):
8667 Make get_named() take two out argument and return a boolean.
8668 (dbus_message_iter_get_args_valist):
8669 Update usage of get_named().
8670 (dbus_message_iter_append_byte):
8672 (dbus_message_iter_append_named)
8674 (message_iter_test), (check_message_handling_type), (_dbus_message_test):
8677 2003-04-10 Alexander Larsson <alexl@redhat.com>
8679 * dbus/dbus-marshal.[ch]:
8680 Add array_type_pos argument to _dbus_marshal_validate_arg.
8681 Let you pass a NULL end_pos to _dbus_marshal_validate_type.
8683 * dbus/dbus-message.[ch]:
8684 Multi-dimensional arrays have full type specification in the
8685 outermost array. Iter code re-arranged to handle this.
8686 Added some more iter tests.
8688 * doc/dbus-specification.sgml:
8691 Update new array encoding description.
8692 Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
8694 * test/data/invalid-messages/array-with-mixed-types.message:
8695 * test/data/valid-messages/array-of-array-of-uint32.message:
8696 Change to the new array format.
8698 * test/data/invalid-messages/too-short-dict.message:
8701 * test/data/valid-messages/recursive-types.message:
8702 Fix up and extend test.
8704 2003-04-10 Havoc Pennington <hp@pobox.com>
8706 * bus/dispatch.c: lots of fixes
8708 * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
8709 (_dbus_loop_iterate): remove old "quit if no callbacks" code,
8710 that was crack, broke the test service.
8712 * dbus/dbus-transport.c (_dbus_transport_open): fix error
8713 handling to avoid piling up errors if we get a failure on the
8716 * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
8717 pid in assertion failures.
8719 * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
8720 to some fixed size of file descriptor array. Don't return TRUE
8721 anytime a timeout exists, that led to lots of busy loop silliness
8724 2003-04-09 Havoc Pennington <hp@redhat.com>
8726 * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
8727 I'd checked this in earlier but hadn't.
8729 2003-04-09 Havoc Pennington <hp@redhat.com>
8731 * bus/dispatch.c (bus_dispatch_test): get a bit further through
8732 the activation test (man this is getting old!)
8734 2003-04-09 Havoc Pennington <hp@redhat.com>
8736 * test/test-utils.c: use dispatch status function to fix this up
8738 * bus/connection.c (connection_watch_callback): don't dispatch
8740 (connection_timeout_callback): don't dispatch from here
8741 (bus_connections_setup_connection): set the dispatch status function
8742 (bus_connection_disconnected): unset it
8744 * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
8745 used to add a connection to be dispatched
8746 (_dbus_loop_iterate): do the dispatching at the end of each
8749 * dbus/dbus-connection.c
8750 (dbus_connection_set_dispatch_status_function): new function
8751 allowing us to fix up main loop usage
8752 (_dbus_connection_last_unref): free all the various function
8754 (dbus_connection_dispatch): call the DispatchStatusFunction
8755 whenever this function returns
8756 (dbus_connection_handle_watch): call DispatchStatusFunction
8757 (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
8758 (reply_handler_timeout): call DispatchStatusFunction
8759 (dbus_connection_flush): call DispatchStatusFunction
8761 2003-04-09 Havoc Pennington <hp@redhat.com>
8763 * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
8766 * bus/dispatch.c (check_service_activated): fix bug in test
8768 * dbus/dbus-mainloop.c (check_timeout): fix this up
8770 * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
8771 verbose output so we can sort out output from different processes,
8772 e.g. in the activation case.
8774 2003-04-08 Colin Walters <walters@gnu.org>
8776 * bus/bus.c (struct BusContext) [pidfile]: New member, to store
8778 (bus_context_new): Set it.
8779 (bus_context_unref): Use it to delete the pid file.
8781 2003-04-08 Havoc Pennington <hp@redhat.com>
8783 * test/data/invalid-messages/array-with-mixed-types.message:
8784 regression test that fails for the moment
8786 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
8787 tests for convenience
8789 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
8790 array of nil, it broke things.
8792 * test/data/invalid-messages/array-of-nil.message: regression test
8794 * test/data/valid-messages/array-of-array-of-uint32.message:
8795 happened to write this so added it to suite
8797 2003-04-08 Havoc Pennington <hp@redhat.com>
8799 * bus/driver.c (bus_driver_handle_acquire_service): init
8800 retval/reply before checking name
8802 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
8803 recursion depth argument
8805 * dbus/dbus-message.h (struct DBusMessageIter): put some padding
8806 in the public struct for future extension
8808 * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
8811 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
8814 * doc/dbus-specification.sgml: fix typo
8816 2003-04-08 Alexander Larsson <alexl@redhat.com>
8818 Implemented recursive types, named types and new-style iters
8821 * glib/test-thread-client.c: (thread_func):
8822 * glib/test-thread-server.c: (handle_test_message):
8823 * test/test-service.c: (handle_echo):
8832 * dbus/dbus-internals.c: (_dbus_type_to_string):
8833 Update for new types.
8835 * dbus/dbus-marshal.[ch]:
8836 Implement recursive types and the new marshalling format.
8837 Remove hardcoded dict marshalling.
8838 Marshal named types.
8840 * dbus/dbus-message-builder.c:
8842 Remove references to old types
8844 * dbus/dbus-message.[ch]:
8845 New non-refcounted iter API that supports recursive iters.
8846 Use iters for appending, including support for recursive
8848 Add byte and named type support.
8849 Update everything to new marshalling formats.
8850 Add tests for new API.
8852 * dbus/dbus-protocol.h:
8853 Remove old array types.
8854 Add types: BYTE, ARRAY, DICT, NAMED
8856 * dbus/dbus-string.c:
8857 * dbus/dbus-sysdeps.c:
8858 Make parse_double locale safe.
8860 * dbus/dbus-test-main.c:
8866 * doc/dbus-specification.sgml:
8869 * test/data/incomplete-messages/missing-body.message:
8870 * test/data/invalid-messages/bad-boolean.message:
8871 * test/data/invalid-messages/bad-boolean-array.message:
8872 * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
8873 * test/data/invalid-messages/boolean-has-no-value.message-raw:
8874 * test/data/invalid-messages/too-short-dict.message:
8875 * test/data/valid-messages/dict-simple.message:
8876 * test/data/valid-messages/dict.message:
8877 * test/data/valid-messages/emptiness.message:
8878 * test/data/valid-messages/lots-of-arguments.message:
8879 * test/data/valid-messages/no-padding.message:
8880 * test/data/valid-messages/recursive-types.message:
8881 Add missing NAME fields
8882 Fix up dicts & arrays
8884 * test/data/invalid-messages/dict-with-nil-value.message:
8885 Removed, this is not invalid anymore.
8887 * test/data/valid-messages/recursive-types.message:
8888 Add new test for deeply recursive types.
8890 2003-04-07 Havoc Pennington <hp@pobox.com>
8892 * bus/driver.c (bus_driver_handle_acquire_service): return an
8893 error if you try to acquire a service that starts with ':'
8895 2003-04-07 Havoc Pennington <hp@redhat.com>
8897 * doc/dbus-specification.sgml: require that base service names
8898 start with ':' and that the base service is created/deleted
8899 as first and last things a connection does on the bus
8901 * bus/dispatch.c (check_existent_service_activation): lots more
8902 work on the activation test; it doesn't fully pass yet...
8904 * test/test-service.c (main): fix so we don't memleak the
8905 connection to the message bus
8906 (filter_func): accept a message asking us to exit
8908 2003-04-06 Havoc Pennington <hp@pobox.com>
8910 * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
8913 * configure.in: fixes to Qt detection from Colin Walters
8915 * doc/Makefile.am: Only remove generated docbook dirs if they
8916 exist, from Colin Walters
8918 * dbus/dbus-bus.c: change how we set well-known connections to
8919 NULL, so that it works if a single connection is stored in
8920 two well-known array slots.
8922 * test/Makefile.am: remove a lot of stuff that isn't immediately
8923 useful, it's in CVS history if we want it.
8925 * test/test-service.c: use dbus-mainloop instead of that
8928 2003-04-06 Havoc Pennington <hp@pobox.com>
8930 * dbus/Makefile.am: split lists of sources into stuff that goes in
8931 the library, util functions that go in the lib and are also used
8932 elsewhere, and util functions that are used in tests/daemon but
8933 don't go in the lib.
8935 * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
8936 here so it can be used in test binaries also
8938 2003-04-06 Havoc Pennington <hp@pobox.com>
8940 * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
8941 here in the parent process, so we can return an error if it
8942 fails. Also, move some of the code into the child so the parent
8943 is less hosed if we fail midway through.
8945 * bus/bus.c (bus_context_new): move pidfile detection further up
8946 in the function, before we start overwriting sockets and such.
8948 * bus/messagebus.in: adjust this a bit, not sure if it will work.
8950 * configure.in: add --with-system-pid-file and --with-system-socket
8952 2003-04-06 Colin Walters <walters@verbum.org>
8954 * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
8956 * bus/system.conf.in: Declare a pidfile.
8958 * bus/bus.c (bus_context_new): Test for an existing pid file, and
8959 create one (if appropriate).
8961 * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
8962 (struct BusConfigParser) [pidfile]: New.
8963 (element_type_to_name, merge_included, start_busconfig_child)
8964 (bus_config_parser_end_element, bus_config_parser_content): Handle it.
8965 (bus_config_parser_unref): Free it.
8966 (bus_config_parser_get_pidfile): New function.
8968 * bus/config-parser.h (_dbus_write_pid_file): Prototype.
8970 * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
8972 * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
8974 * dbus/dbus-sysdeps.h: Prototype it.
8976 2003-04-06 Havoc Pennington <hp@pobox.com>
8978 * bus/bus.c (bus_context_new): print the address in here, rather
8979 than in main(), because we need to do it before forking the daemon
8981 * bus/dispatch.c (send_service_nonexistent_error): set the sender
8982 on the service nonexistent error
8984 * bus/driver.c (bus_driver_handle_acquire_service): set the
8985 sender on the AcquireService reply
8987 * test/data/valid-config-files/debug-allow-all.conf.in: Make test
8988 server also listen on a UNIX socket so services can connect to it.
8990 2003-04-06 Havoc Pennington <hp@pobox.com>
8992 * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
8993 so it detects deadlocks and also we actually init threads when
8996 2003-04-06 Havoc Pennington <hp@pobox.com>
8998 * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
8999 save the domain socket name, and unlink it when we disconnect the
9000 server. Means that at least when we exit normally, we won't leave
9001 a bunch of junk in /tmp
9003 * dbus/dbus-transport-unix.c
9004 (_dbus_transport_new_for_domain_socket): code cleanup (nicer
9005 memory management). (I was making a real change here but then
9008 2003-04-06 Havoc Pennington <hp@pobox.com>
9010 * bus/bus.c (bus_context_new): fix wrong handling of
9011 server_data_slot_unref() in the error case.
9013 * dbus/dbus-internals.h (_dbus_assert): change so it passes
9014 "(condition) != 0" to _dbus_real_assert so that
9015 "_dbus_assert (pointer)" doesn't cause a warning
9017 * bus/main.c (main): accept --print-address option to print out
9018 the message bus address
9020 * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
9022 * dbus/dbus-transport.c (_dbus_transport_open): special error for
9023 "tmpdir" option to unix: address on client side
9025 * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
9028 * configure.in (TEST_SOCKET_DIR): locate a temporary directory
9029 we can use to create sockets in the test suite.
9031 * bus/main.c (signal_handler): on SIGTERM, exit the daemon
9032 cleanly. To be used for testing.
9034 * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
9036 * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
9038 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
9039 handle trying to call this when there's no servers active
9041 2003-04-05 Havoc Pennington <hp@pobox.com>
9047 2003-04-05 Havoc Pennington <hp@pobox.com>
9049 * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
9050 crash on startup. Need to get "try starting the daemon"
9051 in the test suite I guess. ;-)
9053 * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
9054 tracked the number of open connections; it's better done in
9055 application-specific code as you want it to span all servers etc.
9057 2003-04-05 Havoc Pennington <hp@pobox.com>
9059 * bus/Makefile.am (install-data-hook): add missing DESTDIR,
9060 patch from Colin Walters
9062 2003-04-05 Havoc Pennington <hp@pobox.com>
9064 * doc/config-file.txt (Elements): fix docs of <auth> to reflect
9065 reality; in fact multiple mechanisms are allowed.
9067 * dbus/dbus-internals.c (_dbus_real_assert)
9068 (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
9069 _dbus_assert_not_reached() into functions, so that they don't show
9070 up in basic block counts for test coverage, and don't use up as
9071 much disk space. Does mean slower execution speed though, so
9072 assumes --disable-asserts is the normal production case.
9074 2003-04-05 Havoc Pennington <hp@pobox.com>
9076 * test/Makefile.am (dist-hook): also dist *.in files
9082 2003-04-05 Havoc Pennington <hp@pobox.com>
9084 * dbus/dbus-string.c: docs warning
9086 * dbus/dbus-spawn.c: missing docs
9088 * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
9090 2003-04-05 Havoc Pennington <hp@pobox.com>
9092 * bus/loop.c (bus_loop_iterate): fix the timeout code, using
9095 * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
9096 to -1 once we've reaped the babysitter
9097 (_dbus_babysitter_handle_watch): do as much work as we can, not
9100 * bus/activation.c: add code using DBusBabysitter so that we
9101 handle it when a service fails to start up properly.
9102 (bus_activation_service_created): don't remove the activation
9103 entries as we go, just let them get removed when we free the pending
9104 activation. Unref reply messages after sending them.
9106 2003-04-05 Havoc Pennington <hp@pobox.com>
9108 * test/decode-gcov.c (main): print per-directory stats in the report
9110 * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
9112 2003-04-05 Havoc Pennington <hp@pobox.com>
9114 * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
9116 * test/decode-gcov.c: hack up a little program to suck data
9117 out of gcov files. Yes this is sort of silly.
9119 * configure.in: define something in config.h and do an
9120 AM_CONDITIONAL when gcov is enabled
9122 2003-04-04 Havoc Pennington <hp@redhat.com>
9124 * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
9125 return a "babysitter" object that is used to monitor the status of
9126 the spawned process and reap it when required.
9128 * test/test-segfault.c, test/test-exit.c,
9129 test/test-sleep-forever.c: binaries that do various lame things,
9130 used in the test suite.
9132 * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
9134 2003-04-03 Havoc Pennington <hp@pobox.com>
9136 * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
9137 in preparation for modifying it, dbus-sysdeps is getting
9140 2003-04-03 Havoc Pennington <hp@redhat.com>
9142 * bus/loop.h, bus/loop.c: make the mainloop an object so we can
9145 * bus/*.[hc]: adapt to mainloop change
9147 2003-04-03 Havoc Pennington <hp@redhat.com>
9149 * bus/activation.c (load_directory): fix up memleaks
9150 (bus_activation_entry_free): free the entry
9152 * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
9153 we get one from the message bus; fix memleaks.
9155 * dbus/dbus-message.c (dbus_set_error_from_message): new function
9157 2003-04-03 Havoc Pennington <hp@pobox.com>
9159 * bus/config-parser.c (bus_config_parser_unref): free
9160 list of mechanisms, bug discovered by test suite enhancements
9161 (putting system.conf and session.conf into suite)
9163 * test/Makefile.am, test/test-service.c: add placeholder for a
9164 test service that we'll activate as part of test suite. Doesn't
9167 * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
9168 setting NULL value, and use system malloc not dbus_malloc()
9169 when we have unavoidable memleakage.
9171 * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
9172 didn't work, and support DBUS_BUS_ACTIVATION.
9174 * bus/activation.c (child_setup): pass our well-known bus type to
9177 * bus/config-parser.c: support <type> to specify well-known type
9179 * doc/dbus-specification.sgml: document the env variables to
9180 locate well-known buses and find service activator
9182 2003-04-02 Havoc Pennington <hp@redhat.com>
9184 * test/Makefile.am (all-local): add a rule to copy tests to
9185 builddir, so we can have generated tests. Use this to remove the
9186 silly hack for testing system.conf and session.conf. Will use this
9187 shortly to generate .service files pointing to test binaries.
9189 2003-04-02 Havoc Pennington <hp@redhat.com>
9191 * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
9192 current alloc and needed new length, not max of the doubled
9193 allocation and needed new length. Also, when building tests,
9194 don't do the double-allocation stuff, just realloc every time.
9196 2003-04-02 Havoc Pennington <hp@redhat.com>
9198 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
9200 (_dbus_string_get_dirname): new
9201 (_dbus_sysdeps_test): new
9202 (_dbus_directory_open): include dirnames in error messages
9204 * bus/config-parser.c: interpret <include> and <includedir> and
9205 <servicedir> relative to config file location if the given
9206 filename is not absolute.
9208 * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
9210 2003-04-02 Havoc Pennington <hp@redhat.com>
9212 * bus/connection.c (bus_transaction_send_error_reply): set sender
9213 service for the error, and unref the reply on success
9215 * bus/activation.c: convert to use BusTransaction so OOM can be
9217 (bus_activation_service_created): set sender of the message
9219 2003-04-01 Havoc Pennington <hp@redhat.com>
9221 * bus/config-parser.c, bus/bus.c: implement <servicedir> and
9222 <includedir> (at least mostly)
9224 * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
9225 first, then the user ID
9227 2003-04-01 Havoc Pennington <hp@pobox.com>
9229 * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
9232 * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
9234 * dbus/dbus-internals.c (_dbus_dup_string_array): new function
9236 * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
9237 socket 0777, and unlink any existing socket.
9239 * bus/bus.c (bus_context_new): change our UID/GID and fork if
9240 the configuration file so specifies; set up auth mechanism
9243 * bus/config-parser.c (bus_config_parser_content): add support
9244 for <fork> option and fill in code for <auth>
9246 * bus/system.conf.in: add <fork/> to default configuration,
9247 and limit auth mechanisms to EXTERNAL
9249 * doc/config-file.txt (Elements): add <fork>
9251 * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
9252 (_dbus_change_identity): new function
9254 2003-03-31 Havoc Pennington <hp@redhat.com>
9256 * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
9257 (_dbus_listen_unix_socket): fix off-by-one error in null
9258 termination spotted by Nalin
9260 2003-03-31 Havoc Pennington <hp@redhat.com>
9262 * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
9263 DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
9264 having a real home directory available.
9266 2003-03-31 Havoc Pennington <hp@redhat.com>
9268 * bus/Makefile.am (install-data-hook): create /var/run/dbus
9270 * bus/messagebus.in: add init script for Red Hat /etc/init.d
9272 * configure.in: add support for specifying a style of init script
9275 2003-03-31 Havoc Pennington <hp@redhat.com>
9277 Fix some annoying DBusString API and fix all affected code.
9279 * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
9281 (_dbus_string_get_data): change to return string instead of using
9283 (_dbus_string_get_const_data): ditto
9284 (_dbus_string_get_data_len): ditto
9285 (_dbus_string_get_const_data_len): ditto
9287 2003-03-31 Havoc Pennington <hp@redhat.com>
9289 * bus/main.c (main): fix up the command line arguments to be nicer
9291 2003-03-31 Havoc Pennington <hp@redhat.com>
9293 * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
9294 define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
9295 final location that lands in the config file
9297 * bus/config-loader-expat.c (bus_config_load): fix type of
9300 * doc/TODO: remove TODO item for dbus_bus_get()
9302 * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
9304 2003-03-31 Havoc Pennington <hp@pobox.com>
9306 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
9307 (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
9308 argument since they are always client side
9310 * dbus/dbus-server.c (dbus_server_get_address): new function
9312 * bus/main.c (main): take the configuration file as an argument.
9314 * test/data/valid-config-files/debug-allow-all.conf: new file to
9315 use with dispatch.c tests for example
9317 * bus/test-main.c (main): require test data dir
9319 * bus/bus.c (bus_context_new): change this to take a
9320 configuration file name as argument
9322 * doc/config-file.txt (Elements): add <servicedir>
9324 * bus/system.conf, bus/session.conf: new files
9326 * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
9327 well-known socket if none set
9329 * configure.in: create system.conf and session.conf
9331 2003-03-30 Havoc Pennington <hp@pobox.com>
9333 * bus/config-parser.c: hacking
9335 * dbus/dbus-memory.c: don't use DBusList for the list of stuff
9336 to shut down, since it could cause weirdness with the DBusList
9339 * dbus/dbus-list.c (_dbus_list_test): add tests for the
9340 link-oriented stack routines
9341 (alloc_link): free the mempool if the first alloc from it fails
9343 * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
9345 * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
9347 (_dbus_string_skip_white): new
9349 * doc/config-file.txt (Elements): add <includedir>
9351 2003-03-28 Havoc Pennington <hp@pobox.com>
9353 * dbus/dbus-string.c (_dbus_string_copy_data_len)
9354 (_dbus_string_copy_data): new functions
9356 2003-03-28 Anders Carlsson <andersca@codefactory.se>
9358 * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
9362 * dbus/dbus-memory.c:
9365 2003-03-28 Havoc Pennington <hp@pobox.com>
9367 * bus/test.c (bus_test_flush_bus): remove the sleep from here,
9368 I think it may have just been superstition. Not sure.
9370 * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
9371 failures that were not being handled.
9373 * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
9375 * dbus/dbus-memory.c: add ability to set number of mallocs in a
9376 row that will fail on out-of-memory.
9378 * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
9379 function for testing out-of-memory handling.
9381 * bus/config-loader-expat.c (memsuite): don't wrap the dbus
9382 allocation functions, they do map exactly to the expat ones.
9384 2003-03-27 Havoc Pennington <hp@redhat.com>
9386 * bus/config-loader-libxml.c (bus_config_load): add another error
9389 2003-03-26 Anders Carlsson <andersca@codefactory.se>
9392 Add note about automatic service activation.
9394 * doc/dbus-specification.sgml:
9395 Rename the specification and clarify a few things.
9397 2003-03-26 Anders Carlsson <andersca@codefactory.se>
9400 * dbus/dbus-address.c:
9402 * dbus/dbus-marshal.c:
9403 * dbus/dbus-server-debug-pipe.c:
9404 * dbus/dbus-transport-unix.c:
9405 Fix documentation warnings.
9407 2003-03-26 Havoc Pennington <hp@pobox.com>
9409 * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
9410 after every test so it's quick and easy to see which leaked, and
9411 so we test multiple dbus_shutdown() calls
9413 * configure.in: change configure.in XML stuff to also support
9416 * config-loader-libxml.c: some hacking
9418 * config-loader-expat.c: some hacking
9420 * config-parser.c: some hacking, plus tests
9422 2003-03-25 Havoc Pennington <hp@redhat.com>
9424 * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
9426 * configure.in: add --with-xml option to specify XML library,
9427 right now only libxml is supported.
9429 * bus/config-loader-libxml.c, config-parser.c: sync some minor
9430 nonworking code between home and work, still just stubs
9432 2003-03-24 Havoc Pennington <hp@redhat.com>
9434 * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
9437 * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
9438 NULL argument for "message" if the error is a well-known one,
9439 fill in a generic message in this case.
9441 * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
9444 * bus/test.c (bus_test_flush_bus): add
9446 * bus/policy.c (bus_policy_test): test code stub
9448 2003-03-24 Havoc Pennington <hp@pobox.com>
9450 * bus/connection.c (bus_connections_setup_connection): set up
9451 the "can this user connect" function, but it always returns
9452 TRUE until we have a config file parser so we can have a config
9453 file that allows connections.
9455 2003-03-23 Havoc Pennington <hp@pobox.com>
9457 * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
9458 DBUS_BUILD_TESTS, actually alloc/free a block of memory for
9459 the mutex, so we can check for proper memory management
9462 * dbus/dbus-dataslot.c: remove the mutex from
9463 DBusDataSlotAllocator and lock it manually when using it,
9464 to simplify fitting it into the global slots framework.
9466 * dbus/dbus-threads.c (init_static_locks): rework how we're
9467 handling global locks so they are easily shut down.
9469 * bus/policy.c (bus_policy_append_rule): fix
9471 * bus/test-main.c (main): check for memleaks
9473 * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
9474 test suite check for memleaks
9476 * dbus/dbus-memory.c: add support in test mode for tracking
9477 number of outstanding blocks
9479 2003-03-23 Havoc Pennington <hp@pobox.com>
9481 * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
9484 * dbus/dbus-hash.h: add ULONG hash keys
9486 * dbus/dbus-sysdeps.c (_dbus_get_groups): new
9487 (_dbus_get_group_id): new function
9489 2003-03-20 Havoc Pennington <hp@redhat.com>
9491 * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
9493 (dbus_connection_get_unix_user): new function
9495 2003-03-20 Havoc Pennington <hp@pobox.com>
9497 * bus/connection.c (bus_connection_send_oom_error): assert that
9498 message has a sender
9499 (connection_execute_transaction): ditto
9500 (bus_connection_preallocate_oom_error): fix to set the sender, and
9501 set recipient to the destination service, not the bus driver
9503 * bus/policy.c: hacking
9505 * dbus/dbus-message.c (dbus_message_service_is): new function
9506 (dbus_message_sender_is): new
9508 2003-03-19 Havoc Pennington <hp@redhat.com>
9510 * bus/policy.c: start sketching code for policy restrictions on
9511 what connections can do.
9513 2003-03-18 Havoc Pennington <hp@redhat.com>
9515 * doc/TODO: some notes on high-level todo items. Little nitpick
9516 stuff is all in @todo, so no need to add it here.
9518 * doc/config-file.txt: some notes on how config file might look
9520 2003-03-18 Anders Carlsson <andersca@codefactory.se>
9526 2003-03-17 Havoc Pennington <hp@redhat.com>
9528 * dbus/dbus-internals.h: add gcc attributes so that
9529 our printf-style functions warn on bad arguments to
9532 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
9535 * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
9538 2003-03-17 Havoc Pennington <hp@redhat.com>
9540 * bus/test-main.c (main): make it print something as it runs
9541 so make check doesn't look stuck
9543 * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
9544 from CVS, now obsolete
9546 2003-03-17 Anders Carlsson <andersca@codefactory.se>
9548 * bus/dispatch.c: (bus_dispatch):
9549 Refetch the service name since it may have been reallocated
9550 when dbus_message_set_sender was called.
9552 * dbus/dbus-sysdeps.c: (_dbus_accept):
9553 Add address and address length variables and use them to stop
9554 valgrind from complaining.
9556 2003-03-17 Havoc Pennington <hp@pobox.com>
9558 All tests pass, no memleaks, no valgrind complaints.
9560 * bus/test.c: refcount handler_slot
9562 * bus/connection.c (bus_connections_new): refcount
9563 connection_data_slot
9565 * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
9566 bytes so that auth scripts pass.
9568 * bus/dispatch.c: init message_handler_slot so it gets allocated
9571 * bus/dispatch.c (message_handler_slot_ref): fix memleak
9573 * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
9574 dealloc server_pipe_hash when no longer used for benefit of
9577 * dbus/dbus-auth.c (process_command): memleak fix
9579 * bus/dispatch.c (check_hello_message): memleak fix
9581 2003-03-16 Havoc Pennington <hp@pobox.com>
9583 * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
9585 2003-03-17 Anders Carlsson <andersca@codefactory.se>
9587 * bus/activation.c (bus_activation_activate_service): Append
9588 the pending activation entry to the list of pending activations.
9590 2003-03-16 Havoc Pennington <hp@pobox.com>
9592 * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
9595 * dbus/dbus-address.c (create_entry): fix OOM handling when
9596 failing to alloc entry->method
9598 2003-03-16 Havoc Pennington <hp@pobox.com>
9600 * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
9603 * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
9604 add some missing dbus_set_result
9606 * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
9607 alloc the DBusMessageHandler
9609 * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
9610 the transport here, since we call this from the finalizer; it
9611 resulted in a double-finalize.
9613 * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
9614 where we tried to use transport->connection that was NULL,
9615 happened when transport was disconnected early on due to OOM
9617 * bus/*.c: adapt to handle OOM for watches/timeouts
9619 * dbus/dbus-transport-unix.c: port to handle OOM during
9622 * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
9623 reference to unused bytes instead of a copy
9625 * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
9628 * dbus/dbus-connection.c (dbus_connection_handle_watch): return
9631 * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
9634 2003-03-16 Anders Carlsson <andersca@codefactory.se>
9636 * doc/dbus-specification.sgml:
9637 Document reply message for ActivateService.
9639 2003-03-16 Anders Carlsson <andersca@codefactory.se>
9641 * bus/activation.c: (bus_pending_activation_entry_free),
9642 (bus_pending_activation_free), (bus_activation_new),
9643 (bus_activation_unref), (bus_activation_service_created),
9644 (bus_activation_activate_service):
9646 * bus/bus.c: (bus_context_new):
9647 * bus/desktop-file.c: (new_section):
9648 * bus/driver.c: (bus_driver_send_service_deleted),
9649 (bus_driver_handle_activate_service):
9650 * bus/services.c: (bus_registry_new), (bus_registry_ensure):
9652 * dbus/dbus-connection.c:
9653 (dbus_connection_send_with_reply_and_block):
9654 * dbus/dbus-message.c: (dbus_message_append_args_valist):
9655 * dbus/dbus-protocol.h:
9656 Make activation work better. Now pending activations will be queued
9657 and the daemon won't try to activate services that are already registered.
9659 2003-03-16 Havoc Pennington <hp@pobox.com>
9661 * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
9664 * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
9665 DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
9667 2003-03-16 Havoc Pennington <hp@pobox.com>
9669 * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
9670 this. always run the test suite before commit...
9672 * bus/*: adapt to DBusConnection API changes
9674 * glib/dbus-gmain.c: adapt to DBusConnection API changes,
9675 requires renaming stuff to avoid dbus_connection_dispatch name
9678 * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
9681 * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
9682 separate from _dbus_message_loader_return_buffer()
9684 * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
9685 this, because it's now always broken to use; the number of
9686 messages in queue vs. the number still buffered by the message
9687 loader is undefined/meaningless. Should use
9688 dbus_connection_get_dispatch_state().
9689 (dbus_connection_dispatch): rename from
9690 dbus_connection_dispatch_message
9692 2003-03-16 Havoc Pennington <hp@pobox.com>
9694 * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
9697 2003-03-16 Anders Carlsson <andersca@codefactory.se>
9699 * dbus/dbus-connection.c:
9700 (dbus_connection_send_with_reply_and_block):
9701 Decrease connection->n_incoming when removing an entry
9703 * dbus/dbus-dict.c: (dbus_dict_entry_free),
9704 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
9705 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
9706 (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
9707 (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
9708 (dbus_dict_get_byte_array):
9709 Handle NULL arrays and strings. Also add support for byte arrays.
9711 * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
9712 (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
9713 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
9714 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
9715 (_dbus_demarshal_dict), (demarshal_and_validate_len),
9716 (_dbus_marshal_validate_arg), (_dbus_marshal_test):
9717 * dbus/dbus-marshal.h:
9718 Add support for marshalling and demarshalling empty arrays and strings.
9720 * dbus/dbus-message.c: (dbus_message_append_args_valist),
9721 (dbus_message_append_string_array),
9722 (dbus_message_iter_get_boolean),
9723 (dbus_message_iter_get_boolean_array),
9724 (dbus_message_iter_get_int32_array),
9725 (dbus_message_iter_get_uint32_array),
9726 (dbus_message_iter_get_double_array),
9727 (dbus_message_iter_get_byte_array),
9728 (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
9729 (check_message_handling):
9730 Add support for getting empty arrays and dicts.
9732 * dbus/dbus-string.c: (_dbus_string_validate_utf8):
9733 Don't do any validation at all for now, that's better than just checking
9736 * test/data/valid-messages/emptiness.message:
9737 New test message with lots of empty arrays.
9739 2003-03-16 Havoc Pennington <hp@pobox.com>
9741 * dbus/dbus-connection.c
9742 (_dbus_connection_queue_received_message_link): new function that
9743 can't fail due to OOM
9745 * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
9746 new function pops a message together with a list link
9749 * dbus/dbus-transport-unix.c (queue_messages): use new link-based
9750 message queuing functions to avoid needing to alloc memory
9752 2003-03-16 Havoc Pennington <hp@pobox.com>
9754 Oops - test code was only testing failure of around 30 of the
9755 mallocs in the test path, but it turns out there are 500+
9756 mallocs. I believe this was due to misguided linking setup such
9757 that there was one copy of dbus_malloc etc. in the daemon and one
9758 in the shared lib, and only daemon mallocs were tested. In any
9759 case, the test case now tests all 500+ mallocs, and doesn't pass
9760 yet, though there are lots of fixes in this patch.
9762 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
9763 this so that it doesn't need to allocate memory, since it
9764 has no way of indicating failure due to OOM (and would be
9765 annoying if it did).
9767 * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
9769 * bus/Makefile.am: rearrange to create two self-contained
9770 libraries, to avoid having libraries with overlapping symbols.
9771 that was resulting in weirdness, e.g. I'm pretty sure there
9772 were two copies of global static variables.
9774 * dbus/dbus-internals.c: move the malloc debug stuff to
9777 * dbus/dbus-list.c (free_link): free list mempool if it becomes
9780 * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
9782 * dbus/dbus-address.c (dbus_parse_address): free list nodes
9785 * bus/dispatch.c (bus_dispatch_add_connection): free
9786 message_handler_slot when no longer using it, so
9787 memory leak checkers are happy for the test suite.
9789 * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
9791 * bus/bus.c (new_connection_callback): disconnect in here if
9792 bus_connections_setup_connection fails.
9794 * bus/connection.c (bus_connections_unref): fix to free the
9796 (bus_connections_setup_connection): if this fails, don't
9797 disconnect the connection, just be sure there are no side
9800 * dbus/dbus-string.c (undo_alignment): unbreak this
9802 * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
9804 (_dbus_auth_new): fix the order in which we free strings
9807 * bus/connection.c (bus_connection_disconnected): fix to
9808 not send ServiceDeleted multiple times in case of memory
9811 * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
9812 get the base service name
9813 (dbus_bus_register_client): don't return base service name,
9814 instead store it on the DBusConnection and have an accessor
9816 (dbus_bus_register_client): rename dbus_bus_register()
9818 * bus/dispatch.c (check_hello_message): verify that other
9819 connections on the bus also got the correct results, not
9820 just the one sending hello
9822 2003-03-15 Havoc Pennington <hp@pobox.com>
9824 Make it pass the Hello handling test including all OOM codepaths.
9825 Now to do other messages...
9827 * bus/services.c (bus_service_remove_owner): fix crash when
9828 removing owner from an empty list of owners
9829 (bus_registry_ensure): don't leave service in the list of
9830 a connection's owned services if we fail to put the service
9833 * bus/connection.c (bus_connection_preallocate_oom_error): set
9834 error flag on the OOM error.
9836 * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
9837 handle _dbus_transport_set_connection failure
9839 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
9840 to create watches up front and simply enable/disable them as
9842 (unix_connection_set): this can now fail on OOM
9844 * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
9845 of enabling/disabling a watch or timeout.
9847 * bus/loop.c (bus_loop_iterate): don't touch disabled
9850 * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
9852 2003-03-15 Havoc Pennington <hp@pobox.com>
9854 * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
9855 write useful test code, after all that futzing around ;-)
9857 Test does not yet pass because we can't handle OOM in
9858 _dbus_transport_messages_pending (basically,
9859 dbus_connection_preallocate_send() does not prealloc the write
9860 watch). To fix this, I think we need to add new stuff to
9861 set_watch_functions, namely a SetEnabled function so we can alloc
9862 the watch earlier, then enable it later.
9864 * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
9865 dbus-memory.c to the convenience lib
9867 * bus/test.c: rename some static functions to keep them clearly
9868 distinct from stuff in connection.c. Handle client disconnection.
9870 2003-03-14 Havoc Pennington <hp@pobox.com>
9872 * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
9873 transport, tests more of the real codepath. Set up clients
9874 with bus_setup_debug_client.
9876 * bus/test.c (bus_setup_debug_client): function to set up debug
9877 "clients" on the main loop
9879 * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
9882 * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
9885 * dbus/dbus-server-debug.c: support a debug server based on pipes
9887 * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
9888 (_dbus_close): new function
9890 * configure.in: check for socketpair
9892 2003-03-14 Havoc Pennington <hp@redhat.com>
9894 * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
9897 * dbus/dbus-transport-debug.c: rework this a good bit to be
9898 less complicated. hopefully still works.
9900 * dbus/dbus-server-debug.c (handle_new_client): remove timeout
9903 * glib/dbus-gmain.c (timeout_handler): don't remove timeout
9906 * dbus/dbus-message.c (dbus_message_copy): rename from
9907 dbus_message_new_from_message, fix it up to copy
9908 all the message fields, add test case
9910 * bus/dispatch.c (bus_dispatch_test): add some more test code,
9911 not quite passing yet
9913 2003-03-14 Havoc Pennington <hp@pobox.com>
9915 * bus/loop.c (bus_loop_iterate): add this so we can "run loop
9916 until no work remains" in test code. (the large diff here
9917 is just code movement, no actual changes)
9919 * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
9920 1, no point waiting around for test code.
9921 (_dbus_server_debug_accept_transport): unref the timeout
9922 after adding it (right?)
9924 * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
9926 2003-03-13 Havoc Pennington <hp@redhat.com>
9928 * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
9931 * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
9934 * dbus/dbus-connection.h: Make AddWatchFunction and
9935 AddTimeoutFunction return a bool so they can fail on out-of-memory
9937 * bus/bus.c (bus_context_new): set up timeout handlers
9939 * bus/connection.c (bus_connections_setup_connection): set up
9942 * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
9945 * bus/bus.c (bus_context_new): adapt to changes
9947 * bus/connection.c: adapt to changes
9949 * test/watch.c: adapt to DBusWatch changes
9951 * bus/dispatch.c (bus_dispatch_test): started adding this but
9954 2003-03-14 Anders Carlsson <andersca@codefactory.se>
9956 * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
9958 2003-03-13 Havoc Pennington <hp@pobox.com>
9960 * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
9961 set up a test framework as for the library
9963 2003-03-12 Havoc Pennington <hp@pobox.com>
9965 Throughout: purge global variables, introduce BusActivation,
9966 BusConnections, BusRegistry, etc. objects instead.
9968 * bus/bus.h, bus/bus.c: introduce BusContext as a global
9971 * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
9972 going to redo this a bit differently I think
9974 2003-03-12 Havoc Pennington <hp@redhat.com>
9976 Mega-patch that gets the message bus daemon initially handling
9977 out-of-memory. Work still needed. Also lots of random
9978 moving stuff to DBusError instead of ResultCode.
9980 * dbus/dbus-list.c (_dbus_list_length_is_one): new function
9982 * dbus/dbus-connection.c
9983 (dbus_connection_send_with_reply_and_block): use DBusError
9985 * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
9988 * dbus/dbus-connection.c (dbus_connection_send): drop the result
9989 code here, as the only failure possible is OOM.
9991 * bus/connection.c (bus_connection_disconnect):
9992 rename bus_connection_disconnected as it's a notification only
9994 * bus/driver.c (bus_driver_handle_acquire_service): don't free
9995 "name" on get_args failure, should be done by get_args;
9996 don't disconnect client for bad args, just return an error.
9997 (bus_driver_handle_service_exists): ditto
9999 * bus/services.c (bus_services_list): NULL-terminate returned array
10001 * bus/driver.c (bus_driver_send_service_lost)
10002 (bus_driver_send_service_acquired): send messages from driver to a
10003 specific client to the client's unique name, not to the broadcast
10006 * dbus/dbus-message.c (decode_header_data): reject messages that
10007 contain no name field
10008 (_dbus_message_get_client_serial): rename to
10009 dbus_message_get_serial and make public
10010 (_dbus_message_set_serial): rename from set_client_serial
10011 (_dbus_message_set_reply_serial): make public
10012 (_dbus_message_get_reply_serial): make public
10014 * bus/connection.c (bus_connection_foreach): allow stopping
10015 iteration by returning FALSE from foreach function.
10017 * dbus/dbus-connection.c (dbus_connection_send_preallocated)
10018 (dbus_connection_free_preallocated_send)
10019 (dbus_connection_preallocate_send): new API for sending a message
10020 without possibility of malloc failure.
10021 (dbus_connection_send_message): rename to just
10022 dbus_connection_send (and same for whole function family)
10024 * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
10026 * dbus/dbus-sysdeps.c (_dbus_exit): new function
10028 * bus/activation.c: handle/return errors
10030 * dbus/dbus-errors.h: add more DBUS_ERROR #define
10032 * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
10033 (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
10034 (_dbus_result_from_errno): move to this file
10036 2003-03-10 Anders Carlsson <andersca@codefactory.se>
10038 * dbus/dbus-marshal.c:
10039 (_dbus_marshal_set_string):
10040 Take a length argument so we can marshal the correct string
10043 (_dbus_marshal_dict), (_dbus_demarshal_dict),
10044 (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
10045 (_dbus_marshal_test):
10046 * dbus/dbus-marshal.h:
10047 Add support for marshalling and demarshalling dicts.
10049 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10050 Add support for TYPE DICT.
10052 * dbus/dbus-message.c: (set_string_field):
10053 Adjust header padding.
10055 (dbus_message_append_args_valist), (dbus_message_append_dict),
10056 (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
10057 (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
10058 (check_message_handling), (check_have_valid_message):
10059 * dbus/dbus-message.h:
10060 Add functions for setting and getting dicts.
10062 * dbus/dbus-protocol.h:
10063 Add DBUS_TYPE_DICT.
10068 * doc/dbus-specification.sgml:
10069 Add information about how dicts are marshalled.
10071 * test/data/invalid-messages/dict-with-nil-value.message:
10072 * test/data/invalid-messages/too-short-dict.message:
10073 * test/data/valid-messages/dict-simple.message:
10074 * test/data/valid-messages/dict.message:
10075 Add sample messages containing dicts.
10077 2003-03-08 Anders Carlsson <andersca@codefactory.se>
10079 * dbus/dbus-dict.h: Add DBUS_END_DECLS.
10081 2003-03-07 Anders Carlsson <andersca@codefactory.se>
10083 * dbus/Makefile.am:
10084 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
10085 (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
10086 (dbus_dict_set_int32), (dbus_dict_set_uint32),
10087 (dbus_dict_set_double), (dbus_dict_set_string),
10088 (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
10089 (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
10090 (dbus_dict_set_string_array), (_dbus_dict_test):
10091 * dbus/dbus-dict.h:
10092 Fix according to comments from Havoc.
10094 2003-03-06 Michael Meeks <michael@server.home>
10096 * configure.in: if we don't have kde-config, disable have_qt.
10098 2003-03-07 Anders Carlsson <andersca@codefactory.se>
10100 * dbus/Makefile.am:
10103 * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
10104 (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
10105 (dbus_dict_remove), (dbus_dict_get_value_type),
10106 (dbus_dict_get_keys), (dbus_dict_put_boolean),
10107 (dbus_dict_put_int32), (dbus_dict_put_uint32),
10108 (dbus_dict_put_double), (dbus_dict_put_string),
10109 (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
10110 (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
10111 (dbus_dict_put_string_array), (dbus_dict_get_boolean),
10112 (dbus_dict_get_int32), (dbus_dict_get_uint32),
10113 (dbus_dict_get_double), (dbus_dict_get_string),
10114 (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
10115 (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
10116 (dbus_dict_get_string_array), (_dbus_dict_test):
10117 * dbus/dbus-dict.h:
10118 Add DBusDict implementation
10120 * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
10121 * dbus/dbus-test.h:
10122 Add _dbus_dict_test
10124 2003-03-04 Havoc Pennington <hp@pobox.com>
10126 * test/data/auth/*: adapt to changes
10128 * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
10129 USERID_BASE64 and change USERNAME_BASE64 to put in username not
10132 * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
10133 more stuff from being in a context name, to make the protocol
10134 simpler to deal with
10136 * dbus/dbus-errors.c (dbus_error_has_name): new function
10137 (dbus_error_is_set): new function
10139 * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
10140 with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
10142 * dbus/dbus-connection.c (dbus_connection_flush): also read
10143 messages during a flush operation
10145 * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
10147 2003-03-05 Anders Carlsson <andersca@codefactory.se>
10149 * configure.in: Check for gethostbyname on Solaris.
10151 * dbus/dbus-transport.c: (_dbus_transport_open):
10152 Remove duplicate "tcp" entry.
10154 * doc/dbus-specification.sgml:
10155 Clarify some things.
10157 2003-03-05 Anders Carlsson <andersca@codefactory.se>
10159 * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
10160 * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
10161 (_dbus_keyring_test):
10162 * dbus/dbus-md5.c: (_dbus_md5_compute):
10163 * dbus/dbus-sha.c: (_dbus_sha_compute):
10166 2003-03-05 Anders Carlsson <andersca@codefactory.se>
10168 * README: Add some things.
10170 2003-03-04 Anders Carlsson <andersca@codefactory.se>
10172 * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
10173 after case DBUS_TYPE_BOOELAN.
10175 2003-03-02 Havoc Pennington <hp@pobox.com>
10177 * test/break-loader.c (randomly_set_extreme_ints): add test that
10178 sets really huge and small integers
10180 * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
10181 that length of boolean array fits in the string, and that
10182 string has room for boolean value in single-bool case.
10184 * dbus/dbus-message-builder.c (_dbus_message_data_load): add
10185 optional value to "ALIGN" command which is what to fill the
10188 * test/data/valid-messages/no-padding.message: add regression
10189 test for the message padding problem
10191 2003-03-02 Havoc Pennington <hp@pobox.com>
10193 * dbus/dbus-message.c (decode_header_data): fix to always init
10194 message_padding, from Benjamin Dauvergne
10196 2003-03-02 Havoc Pennington <hp@pobox.com>
10198 * configure.in: 0.5
10202 2003-03-01 Joe Shaw <joe@assbarn.com>
10204 * configure.in: Check for "struct cmsgcred" and try to access its
10205 members for BSD-like unices.
10207 * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
10208 _dbus_read_credentials_unix_socket().
10209 (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
10210 read() for reading the credential byte off the unix socket. Use
10211 struct cmsgcred on systems that support it.
10213 2003-02-27 Alexander Larsson <alexl@redhat.com>
10215 * glib/Makefile.am:
10217 Make gthreads-2.0 dependency optional. Don't build thread test if
10220 2003-02-27 Havoc Pennington <hp@pobox.com>
10222 * dbus/dbus-connection.c
10223 (dbus_connection_send_message_with_reply_and_block): fix doh!
10224 doh! doh! bug that resulted in never removing a reply from the
10225 queue, no wonder we called get_reply_serial so much ;-)
10227 * dbus/dbus-message.c (struct DBusMessage): cache reply serial
10228 and client serial instead of demarshaling them every time
10230 2003-02-27 Havoc Pennington <hp@pobox.com>
10232 * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
10233 more inlined, using dbus-string-private.h, speeds things up
10236 * dbus/dbus-string.c (_dbus_string_free): apply align offset
10237 when freeing the string
10238 (_dbus_string_steal_data): fix for align offset
10239 (undo_alignment): new function
10241 2003-02-26 Havoc Pennington <hp@redhat.com>
10243 All kinds of audit fixes from Owen, plus initial attempt to
10244 handle unaligned memory returned from malloc.
10246 * dbus/dbus-string.c (_dbus_string_init): clamp max length to
10247 leave room for align_offset and nul byte
10248 (fixup_alignment): function to track an align_offset and
10249 ensure real->str is aligned
10250 (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
10251 to allow a nul byte plus align offset
10252 (_dbus_string_lock): fix overflow issue
10253 (_dbus_string_init_const_len): add assertions on sanity of len,
10254 assign allocated to be ALLOCATION_PADDING larger than len
10255 (set_length): fixup the overflow handling
10256 (_dbus_string_get_data_len): fix overflow in assertion
10257 (open_gap): detect overflow in size of gap to be opened
10258 (_dbus_string_lengthen): add overflow check
10259 (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
10260 (_dbus_string_append): add overflow check
10261 (_dbus_string_append_unichar): overflow
10262 (_dbus_string_delete): fix overflow in assertion
10263 (_dbus_string_copy_len): overflow in assertion
10264 (_dbus_string_replace_len): overflows in assertions
10265 (_dbus_string_find): change to implement in terms of
10266 _dbus_string_find_to
10267 (_dbus_string_find_to): assorted fixage
10268 (_dbus_string_equal_c_str): assert c_str != NULL,
10269 fix logic so the function works
10270 (_dbus_string_ends_with_c_str): fix overflow thingy
10271 (_dbus_string_base64_encode): overflow fix
10272 (_dbus_string_validate_ascii): overflow
10273 (_dbus_string_validate_nul): overflow
10275 2003-02-26 Havoc Pennington <hp@redhat.com>
10277 * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
10279 2003-02-26 Alexander Larsson <alexl@redhat.com>
10282 Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
10284 * dbus/dbus-connection.c:
10285 * dbus/dbus-connection.h:
10286 Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
10287 Add dbus_connection_set_wakeup_main_function and use it when queueing
10288 incoming and outgoing messages.
10291 * dbus/dbus-dataslot.c:
10292 Threadsafe usage of DBusDataSlotAllocator
10294 * dbus/dbus-message.c: (dbus_message_get_args_iter):
10297 * dbus/dbus-server-unix.c:
10300 * glib/dbus-gmain.c:
10301 Implement the new wakeup functions for glib.
10303 * glib/Makefile.am:
10304 * glib/test-thread-client.c:
10305 * glib/test-thread-server.c:
10306 * glib/test-thread.h:
10307 Initial cut at some thread test code. Not really done yet.
10309 2003-02-26 Havoc Pennington <hp@pobox.com>
10311 * dbus/dbus-connection.c
10312 (dbus_connection_send_message_with_reply_and_block): fix crash
10313 where we ref'd the outgoing message instead of the returned reply
10315 * dbus/dbus-transport-unix.c (do_authentication): check read watch
10316 at the end of this function, so if we didn't need to read for
10317 authentication, we reinstall it for receiving messages
10319 * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
10320 a NULL sender for peer-to-peer case
10322 * dbus/dbus-transport-unix.c (check_read_watch): handle
10323 !authenticated case correctly
10325 * glib/dbus-gmain.c: add support for DBusServer
10327 * dbus/dbus-server.c: add data slot support
10329 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
10330 return values and handle errors
10332 * dbus/dbus-dataslot.c: factor out the data slot stuff from
10335 * Doxyfile.in (INPUT): add glib subdir
10337 * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
10338 setup_with_g_main instead of hookup_with_g_main; write docs
10340 2003-02-24 Anders Carlsson <andersca@codefactory.se>
10342 * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
10343 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10344 * dbus/dbus-message.c: (dbus_message_append_boolean),
10345 (dbus_message_append_boolean_array),
10346 (dbus_message_get_args_valist), (_dbus_message_test):
10347 * dbus/dbus-message.h:
10348 * doc/dbus-specification.sgml:
10349 Various fixes as pointed out by Havoc.
10351 * test/data/invalid-messages/bad-boolean-array.message:
10352 * test/data/invalid-messages/bad-boolean.message:
10353 Add invalid boolean value test cases.
10355 2003-02-24 Anders Carlsson <andersca@codefactory.se>
10357 * dbus/dbus-internals.c: (_dbus_type_to_string):
10358 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
10359 (_dbus_marshal_validate_arg):
10360 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10361 * dbus/dbus-message.c: (dbus_message_append_args_valist),
10362 (dbus_message_append_boolean), (dbus_message_append_boolean_array),
10363 (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
10364 (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
10365 (dbus_message_iter_get_double),
10366 (dbus_message_iter_get_boolean_array), (message_iter_test):
10367 * dbus/dbus-message.h:
10368 * dbus/dbus-protocol.h:
10369 * doc/dbus-specification.sgml:
10370 * test/data/valid-messages/lots-of-arguments.message:
10371 Add support for boolean and boolean array types.
10373 2003-02-23 Havoc Pennington <hp@pobox.com>
10375 * dbus/dbus-keyring.c: finish most of this implementation and
10378 * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
10379 these barf if the error isn't cleared to NULL
10381 * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
10382 (_dbus_create_directory): new function
10384 * dbus/dbus-errors.c (dbus_set_error): fix warning
10386 * dbus/dbus-string.c (_dbus_string_hex_encode): new function
10387 (_dbus_string_hex_decode): new function
10388 (test_hex_roundtrip): test code
10390 * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
10392 * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
10394 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
10395 the save-to-temp/rename trick to atomically write the new file
10396 (_dbus_string_parse_uint): new function
10398 2003-02-22 Havoc Pennington <hp@pobox.com>
10400 * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
10402 2003-02-22 Havoc Pennington <hp@pobox.com>
10404 * dbus/dbus-message.c (dbus_message_iter_get_string_array):
10405 (dbus_message_iter_get_byte_array): Fix up doxygen warnings
10407 * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
10409 * dbus/test/data/sha-1: add US government test suite for SHA-1
10411 2003-02-21 Anders Carlsson <andersca@codefactory.se>
10413 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
10414 Make string arrays NULL-terminated.
10416 * dbus/dbus-memory.c: (dbus_free_string_array):
10417 * dbus/dbus-memory.h:
10418 New function for freeing NULL-terminated string arrays.
10420 * dbus/dbus-message-builder.c: (append_quoted_string),
10421 (_dbus_message_data_load):
10422 Add support for array types.
10424 * dbus/dbus-message.c: (check_message_handling):
10425 Add more types as test cases.
10427 * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
10428 (_dbus_string_parse_double):
10429 Add the start offset to the end offset.
10431 * test/data/valid-messages/lots-of-arguments.message:
10432 New test message with lots of arguments.
10434 2003-02-21 Anders Carlsson <andersca@codefactory.se>
10436 * dbus/dbus-message.c: (dbus_message_append_nil),
10437 (dbus_message_append_int32), (dbus_message_append_uint32),
10438 (dbus_message_append_double), (dbus_message_append_string),
10439 (dbus_message_append_int32_array),
10440 (dbus_message_append_uint32_array),
10441 (dbus_message_append_double_array),
10442 (dbus_message_append_byte_array),
10443 (dbus_message_append_string_array):
10444 Fix all out-of-memory handling in these functions.
10446 2003-02-21 Anders Carlsson <andersca@codefactory.se>
10448 * dbus/dbus-message.c: (dbus_message_append_nil):
10451 2003-02-21 Anders Carlsson <andersca@codefactory.se>
10453 * dbus/dbus-message.c: (dbus_message_append_args_valist),
10454 (dbus_message_append_nil), (dbus_message_append_int32_array),
10455 (dbus_message_append_uint32_array),
10456 (dbus_message_append_double_array),
10457 (dbus_message_append_byte_array),
10458 (dbus_message_append_string_array), (dbus_message_get_args_valist),
10459 (dbus_message_iter_get_int32_array),
10460 (dbus_message_iter_get_uint32_array),
10461 (dbus_message_iter_get_double_array),
10462 (dbus_message_iter_get_byte_array),
10463 (dbus_message_iter_get_string_array):
10465 * dbus/dbus-message.h:
10466 Add functions for appending and getting arrays.
10468 2003-02-21 Anders Carlsson <andersca@codefactory.se>
10470 * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
10471 element size at least 8 bytes, fixes mempool tests on
10474 2003-02-20 Alexander Larsson <alexl@redhat.com>
10476 * dbus/dbus-transport-unix.c (unix_do_iteration):
10477 Unlock the connection mutex during a blocking select call.
10478 Add todo about how we need a way to wake up the select.
10480 * dbus/dbus-connection-internal.h:
10481 * dbus/dbus-connection.c:
10482 Add _dbus_connection_lock and _dbus_connection_unlock.
10484 2003-02-19 Havoc Pennington <hp@pobox.com>
10486 * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
10487 Doxyfile.in, not Doxyfile
10489 * dbus/dbus-keyring.c: do some hacking on this
10491 * dbus/dbus-sysdeps.c (_dbus_delete_file): new
10493 * dbus/dbus-errors.c (dbus_set_error_const): do not call
10495 (dbus_set_error): remove dbus_error_init, check for message ==
10496 NULL *before* we sprintf into it, and add @todo about including
10497 system headers in this file
10499 * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
10501 * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
10503 * dbus/dbus-sysdeps.c (get_user_info): break this function out to
10504 get various bits of user information based on either username
10506 (_dbus_homedir_from_username): new function
10508 2003-02-19 Anders Carlsson <andersca@codefactory.se>
10511 Add check for nonposix getpwnam_r
10513 * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
10514 Align the pool element size to a sizeof (void *) boundary.
10516 * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
10517 (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
10518 General Solaris fixes.
10520 * test/data/valid-messages/simplest-manual.message:
10521 Explicitly state that we want little-endian packing.
10523 2003-02-19 Mikael Hallendal <micke@codefactory.se>
10525 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10527 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
10528 Added to create a transport connecting using a tcp/ip socket.
10530 * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
10531 to a tcp socket at given host and port.
10532 (_dbus_listen_tcp_socket): added to listen on tcp socket for given
10535 * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
10537 * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
10538 Added to create a server listening on a TCP/IP socket.
10540 2003-02-19 Havoc Pennington <hp@pobox.com>
10542 Throughout: mop up all the Doxygen warnings and undocumented
10545 * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
10546 to search any paths.
10548 * dbus/dbus-threads.c: move global mutex initializers to
10549 dbus-internals.h, multiple prototypes was confusing doxygen
10550 besides being kind of ugly
10552 * Doxyfile (PREDEFINED): have Doxygen define
10553 DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
10554 docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
10555 (do not abuse the feature! it's for stuff like the autogenerated
10556 macros in dbus-md5.c, not just for things you don't feel like
10559 2003-02-18 Havoc Pennington <hp@pobox.com>
10561 * dbus/dbus-string.c (_dbus_string_zero): new function
10563 * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
10564 wrap it in some dbus-friendly API
10566 * dbus/dbus-types.h: add 16-bit types
10568 2003-02-18 Joe Shaw <joe@assbarn.com>
10570 * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
10571 credentials from our currently running process.
10572 (get_word): Fix a buglet where we were copying the entire length
10573 instead of relative to our position.
10575 * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
10576 keys on the stack... it's 640k of data.
10578 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
10579 read the credentials byte off the socket, even if we don't have
10581 (_dbus_poll): Implement poll() using select() for systems which
10584 * glib/test-dbus-glib.c (main): Print out an error if no
10585 parameters are given.
10587 * test/data/auth/fallback.auth-script: Added. Tests that a client
10588 can fallback to a secondary auth mechanism if the first fails.
10590 2003-02-18 Havoc Pennington <hp@pobox.com>
10592 * AUTHORS: add Alex
10594 2003-02-17 Havoc Pennington <hp@pobox.com>
10596 * doc/dbus-specification.sgml: lots of cosmetic
10597 cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
10598 env variable to DBUS_BUS_ADDRESS, s/client/application/,
10599 s/server/bus/ (except in authentication section). Add a section
10600 "Message Bus Message Routing"
10602 2003-02-17 Anders Carlsson <andersca@codefactory.se.>
10608 2003-02-17 Anders Carlsson <andersca@codefactory.se>
10610 * doc/dbus-specification.sgml:
10611 Specification updates.
10613 2003-02-17 Anders Carlsson <andersca@codefactory.se>
10615 * bus/activation.c: (bus_activation_init), (child_setup),
10616 (bus_activation_activate_service):
10617 * bus/activation.h:
10618 * bus/main.c: (main):
10619 Set DBUS_ADDRESS environment variable.
10621 * dbus/dbus-errors.c: (dbus_set_error):
10622 Don't use va_copy since that's a C99 feature.
10624 * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
10625 (_dbus_spawn_async):
10626 * dbus/dbus-sysdeps.h:
10627 Add child_setup_func to _dbus_spawn_async.
10629 * doc/dbus-specification.sgml:
10630 Update specification.
10632 * test/spawn-test.c: (setup_func), (main):
10635 2003-02-17 Alexander Larsson <alexl@redhat.com>
10637 * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
10640 2003-02-17 Anders Carlsson <andersca@codefactory.se>
10644 * doc/dbus-test-plan.sgml:
10645 Add test plan document.
10647 * test/Makefile.am:
10650 2003-02-17 Anders Carlsson <andersca@codefactory.se>
10652 * dbus/dbus-message.c: (decode_header_data),
10653 (_dbus_message_loader_return_buffer):
10654 Set the header padding amount when loading a message.
10656 2003-02-16 Anders Carlsson <andersca@codefactory.se>
10658 * bus/dispatch.c: (send_one_message):
10659 Only send broadcast messages to registered connections.
10661 * dbus/dbus-message.c: (dbus_message_name_is):
10662 * dbus/dbus-message.h:
10663 New convenience function.
10665 * dbus/dbus-transport-debug.c: (do_reading):
10666 Only dispatch one message per run.
10668 * test/Makefile.am:
10669 * test/bus-test.c: (new_connection_callback), (die),
10670 (test_hello_client1_handler), (test_hello_client2_handler),
10671 (test_hello_replies), (main):
10673 * test/bus-test-loop.[ch]:
10676 2003-02-16 Havoc Pennington <hp@pobox.com>
10678 * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
10679 backward conditional
10681 2003-02-16 Alexander Larsson <alexl@redhat.com>
10683 * dbus/dbus-connection.c:
10684 Implement sent_message_with_reply. (with_reply_and block is still
10686 Made dispatch_message not lose message if OOM.
10688 * dbus/dbus-errors.h:
10689 Add NoReply error (for reply timeouts).
10691 2003-02-16 Alexander Larsson <alexl@redhat.com>
10693 * dbus/dbus-hash.c (_dbus_hash_table_unref):
10694 Actually free keys and values when destroying hashtable.
10696 2003-02-16 Anders Carlsson <andersca@codefactory.se>
10698 * dbus/dbus-auth.c: (client_try_next_mechanism):
10701 * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
10702 Return TRUE if there's no thread implementation around.
10704 * glib/dbus-gmain.c: (free_source),
10705 (dbus_connection_hookup_with_g_main):
10706 Make sure to remove the GSource when the connection is finalized.
10708 2003-02-16 Anders Carlsson <andersca@codefactory.se>
10710 * bus/dispatch.c: (bus_dispatch_message_handler):
10711 * dbus/dbus-errors.h:
10712 Return an error if someone tries to send a message to a service
10713 that doesn't exist.
10715 2003-02-16 Anders Carlsson <andersca@codefactory.se>
10717 * bus/activation.c: (load_directory), (bus_activation_init),
10718 (bus_activation_activate_service):
10719 * bus/activation.h:
10721 (bus_driver_handle_activate_service), (bus_driver_handle_message):
10722 More work on the activation handling.
10724 * dbus/dbus-errors.h:
10725 Add some error messages
10727 * dbus/dbus-message.c: (dbus_message_new_error_reply):
10728 * dbus/dbus-message.h:
10729 New function that creates an error message.
10731 * dbus/dbus-protocol.h:
10732 Add ACTIVATE_SERVER message.
10734 * dbus/dbus-server-unix.c: (unix_handle_watch),
10735 (_dbus_server_new_for_domain_socket):
10736 Call _dbus_fd_set_close_on_exec.
10738 * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
10739 (_dbus_spawn_async), (_dbus_disable_sigpipe),
10740 (_dbus_fd_set_close_on_exec):
10741 * dbus/dbus-sysdeps.h:
10742 Add _dbus_fd_set_close_on exec function. Also add function that checks
10743 that all open fds are set to close-on-exec and warns otherwise.
10745 * dbus/dbus-transport-unix.c:
10746 (_dbus_transport_new_for_domain_socket):
10747 Call _dbus_fd_set_close_on_exec.
10749 2003-02-16 Havoc Pennington <hp@pobox.com>
10751 * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
10752 allow people to avoid setting SIGPIPE to SIG_IGN
10753 (_dbus_connection_new_for_transport): disable SIGPIPE unless
10754 we've been asked not to
10756 2003-02-15 Anders Carlsson <andersca@codefactory.se>
10758 * dbus/dbus-list.c: (_dbus_list_append_link),
10759 (_dbus_list_prepend_link):
10760 * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
10764 2003-02-15 Anders Carlsson <andersca@codefactory.se>
10767 * bus/activation.c: (bus_activation_entry_free),
10768 (add_desktop_file_entry), (load_directory), (bus_activation_init):
10769 * bus/activation.h:
10770 * bus/main.c: (main):
10771 Add simple activation support, doesn't work yet though.
10773 2003-02-15 Zack Rusin <zack@kde.org>
10775 * qt/dbus-qthread.cpp: small casting fix
10777 2003-02-15 Anders Carlsson <andersca@codefactory.se>
10779 * dbus/dbus-errors.c: (dbus_set_error):
10780 * dbus/dbus-errors.h:
10781 Add a few errors and make dbus_set_error void.
10783 * dbus/dbus-sysdeps.c:
10784 (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
10785 (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
10786 * dbus/dbus-sysdeps.h:
10787 Add _dbus_spawn_async.
10789 * test/spawn-test.c: (main):
10790 Test for _dbus_spawn_async.
10792 2003-02-15 Anders Carlsson <andersca@codefactory.se>
10794 * dbus/dbus-internals.h:
10795 Fix build without tests.
10797 * dbus/dbus-list.c: (alloc_link):
10798 Fix a segfault when a malloc fails.
10800 * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
10801 (dbus_malloc0), (dbus_realloc):
10802 Add support for malloc debugging.
10804 2003-02-15 Alexander Larsson <alexl@redhat.com>
10806 * dbus/dbus-threads.c:
10807 * dbus/dbus-threads.h:
10808 Add condvars. Remove static mutext from API.
10809 Implement static mutexes by initializing them from threads_init.
10811 * glib/dbus-gthread.c:
10812 * qt/dbus-qthread.cpp:
10813 Update with the thread api changes.
10816 * dbus/dbus-list.c:
10817 * dbus/dbus-list.h:
10818 Turn StaticMutex into normal mutex + init function.
10819 Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
10820 _dbus_list_append_link, _dbus_list_prepend_link
10823 * dbus/dbus-sysdeps.c:
10824 * dbus/dbus-sysdeps.h:
10825 New type dbus_atomic_t, and new functions _dbus_atomic_inc,
10826 _dbus_atomic_dec. Only slow fallback implementation at the moment.
10828 * dbus/dbus-protocol.h:
10829 Add DBUS_MESSAGE_LOCAL_DISCONNECT define
10831 * dbus/dbus-message.c:
10832 Make ref/unref atomic.
10835 * dbus/dbus-connection-internal.h:
10836 * dbus/dbus-connection.c:
10837 * dbus/dbus-connection.h:
10839 Change _peek to _borrow,_return & _steal_borrowed.
10840 Change disconnect callback to event.
10841 Make dbus_connection_dispatch_messages reentrant.
10843 * dbus/dbus-transport.c:
10844 Don't ref the connection on calls to the transport
10847 * dbus/dbus-message-handler.c:
10850 * glib/dbus-gmain.c:
10851 Don't use peek_message anymore
10853 * test/Makefile.am:
10854 * test/debug-thread.c:
10855 * test/debug-thread.h:
10856 Simple thread implementation that asserts() on deadlocks in
10857 single-threaded code.
10860 (main) Call debug_threads_init.
10863 Use disconnect message instead of disconnect callback.
10865 * bus/connection.c:
10866 * bus/connection.h:
10867 Don't call dbus_connection_set_disconnect_function. Instead export
10868 bus_connection_disconnect.
10871 Call bus_connection_disconnect when we get a disconnected message.
10873 2003-02-15 Havoc Pennington <hp@pobox.com>
10875 * dbus/dbus-message.c (dbus_message_new): fool around with the
10878 2003-02-14 Havoc Pennington <hp@pobox.com>
10880 * dbus/dbus-mempool.c: fail if the debug functions so indicate
10882 * dbus/dbus-memory.c: fail if the debug functions indicate we
10885 * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
10886 (_dbus_decrement_fail_alloc_counter): debug functions to
10887 simulate memory allocation failures
10889 2003-02-14 Havoc Pennington <hp@pobox.com>
10891 * dbus/dbus-errors.h (struct DBusError): add a word of padding
10894 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10896 * bus/driver.c: (bus_driver_handle_hello):
10898 * bus/services.c: (bus_service_lookup):
10899 Reorder message sending so we get a more sane order.
10901 * test/bus-test.c: (message_handler):
10904 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10906 * bus/driver.c: (bus_driver_send_service_deleted),
10907 (bus_driver_send_service_created), (bus_driver_send_service_lost),
10908 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10909 (bus_driver_send_welcome_message),
10910 (bus_driver_handle_list_services),
10911 (bus_driver_handle_acquire_service),
10912 (bus_driver_handle_service_exists):
10913 * dbus/dbus-bus.c: (dbus_bus_register_client),
10914 (dbus_bus_acquire_service), (dbus_bus_service_exists):
10915 * dbus/dbus-errors.c: (dbus_result_to_string):
10916 * dbus/dbus-errors.h:
10917 * dbus/dbus-message.c: (dbus_message_append_args),
10918 (dbus_message_append_args_valist), (dbus_message_get_args),
10919 (dbus_message_get_args_valist), (dbus_message_get_args_iter),
10920 (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
10921 (dbus_message_iter_get_byte_array),
10922 (dbus_message_iter_get_string_array), (message_iter_test),
10923 (check_message_handling), (_dbus_message_test):
10924 * dbus/dbus-message.h:
10925 * test/bus-test.c: (main):
10926 Change fields to arguments in messages, so that they won't be
10927 confused with header fields.
10929 * glib/test-dbus-glib.c: (main):
10930 Remove append_fields from hello message.
10932 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10934 * dbus/dbus-errors.c:
10935 * dbus/dbus-message.c:
10936 * dbus/dbus-string.c:
10937 Documentation fixes.
10939 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10941 * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
10943 Implement support for timeouts in dbus-glib.
10945 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10947 * dbus/dbus-message-builder.c: (_dbus_message_data_load):
10948 * dbus/dbus-message.c: (process_test_subdir):
10949 * test/break-loader.c: (find_breaks_based_on):
10950 Plug some memory leaks.
10952 2003-02-13 Richard Hult <rhult@codefactory.se>
10954 * bus/main.c: Fix build.
10956 * dbus/dbus-errors.h:
10957 * dbus/dbus-errors.c: Fix copyright for Anders.
10959 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10964 * bus/connection.c: (bus_connection_foreach):
10967 * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
10968 (unescape_string), (new_section), (parse_section_start),
10969 (parse_key_value), (report_error), (bus_desktop_file_load),
10970 (bus_desktop_file_get_string):
10971 * bus/desktop-file.h:
10972 Use DBusError for error reporting.
10974 * bus/dispatch.c: (send_one_message),
10975 (bus_dispatch_message_handler):
10976 * bus/driver.c: (bus_driver_send_service_deleted),
10977 (bus_driver_send_service_created), (bus_driver_send_service_lost),
10978 (bus_driver_send_service_acquired), (bus_driver_handle_hello),
10979 (bus_driver_send_welcome_message),
10980 (bus_driver_handle_list_services),
10981 (bus_driver_handle_acquire_service),
10982 (bus_driver_handle_service_exists):
10983 * bus/loop.c: (bus_loop_run):
10985 Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
10987 * bus/utils.c: (bus_wait_for_memory):
10989 New files with general utility functions.
10991 * dbus/dbus-internals.h:
10992 Remove _DBUS_HANDLE_OOM.
10994 2003-02-13 Anders Carlsson <andersca@codefactory.se>
10996 * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
10997 (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
10998 * dbus/dbus-errors.h:
10999 Add DBusError structure.
11001 2003-02-13 Anders Carlsson <andersca@codefactory.se>
11003 * test/data/valid-messages/standard-acquire-service.message:
11004 * test/data/valid-messages/standard-hello.message:
11005 * test/data/valid-messages/standard-list-services.message:
11006 * test/data/valid-messages/standard-service-exists.message:
11007 Add some standard messages.
11009 2003-02-13 Anders Carlsson <andersca@codefactory.se>
11011 * bus/driver.c: (bus_driver_send_welcome_message),
11012 (bus_driver_handle_list_services),
11013 (bus_driver_handle_acquire_service),
11014 (bus_driver_handle_service_exists), (bus_driver_handle_message):
11015 Update for API changes in libdbus.
11017 * dbus/dbus-message.c: (dbus_message_new_reply):
11018 * dbus/dbus-message.h:
11019 Remove the name argument. The spec states that replies shouldn't
11022 2003-02-13 Anders Carlsson <andersca@codefactory.se>
11024 * bus/desktop-file.c: (parse_section_start), (parse_key_value),
11025 (report_error), (bus_desktop_file_load), (lookup_section),
11026 (lookup_line), (bus_desktop_file_get_raw),
11027 (bus_desktop_file_get_string):
11028 * bus/desktop-file.h:
11029 Some fixes, and new functions for getting a key value from a section.
11031 2003-02-13 Havoc Pennington <hp@pobox.com>
11033 * test/data/auth/fail-after-n-attempts.auth-script: new test
11035 * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
11038 2003-02-13 Havoc Pennington <hp@pobox.com>
11040 * dbus/dbus-auth.c (handle_server_data_external_mech): args to
11041 dbus_credentials_match were backward
11043 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
11044 NO_CREDENTIALS and ROOT_CREDENTIALS
11046 * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
11047 into here. Never process more commands after we've reached an
11048 end state; store further data as unused bytes.
11050 * test/data/auth/*: add more auth tests
11052 * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
11053 command to match exact string and EXPECT_UNUSED to match unused
11056 * test/Makefile.am (dist-hook): fix to dist all the test stuff
11058 2003-02-12 Havoc Pennington <hp@pobox.com>
11060 * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
11061 \r off of popped lines
11063 * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
11066 * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
11069 2003-02-12 Havoc Pennington <hp@pobox.com>
11071 * dbus/Makefile.am: remove break-loader from the build, since it
11074 * configure.in: add --enable-gcov to turn on coverage profiling
11075 flags and disable optimization
11077 2003-02-10 Havoc Pennington <hp@pobox.com>
11079 * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
11080 initial cut at test framework for DBusAuth from laptop.
11081 Doesn't quite work yet but it compiles and I need to get
11082 it off the 266mhz laptop. ;-)
11084 * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
11085 fix a memleak in error case
11087 2003-02-12 Anders Carlsson <andersca@codefactory.se>
11090 * bus/desktop-file.c:
11091 * bus/desktop-file.h:
11092 Add a desktop file parser.
11094 2003-02-11 Zack Rusin <zack@kde.org>
11096 * qt/message.[h|cpp]: sample implementation
11097 of the KDE wrapper for DBusMessage
11099 2003-02-09 Zack Rusin <zack@kde.org>
11101 * test/bus-test.c: make_it_compile
11102 * doc/dbus-specification.sgml: minimal semantic fix
11104 2003-02-06 Anders Carlsson <andersca@codefactory.se>
11110 2003-02-06 Anders Carlsson <andersca@codefactory.se>
11112 * dbus/Makefile.am:
11113 * dbus/dbus-break-loader.c:
11114 * test/Makefile.am:
11115 * test/break-loader.c:
11116 Move dbus-break-loader to test/ and rename it to break-loader.
11118 2003-02-02 Havoc Pennington <hp@pobox.com>
11120 * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
11121 for code to manage cookies in your home directory
11123 * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
11125 * dbus/dbus-auth.c (get_state): impose a maximum number of tries
11126 to authenticate, then disconnect the client.
11128 2003-02-03 Alexander Larsson <alexl@redhat.com>
11130 * dbus/dbus-message.c (dbus_message_append_fields):
11133 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11135 * doc/dbus-specification.sgml:
11136 Update address format section.
11138 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11140 * test/Makefile.am:
11141 * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
11142 (message_handler), (new_connection_callback), (loop_quit),
11143 (loop_run), (main):
11146 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11148 * bus/driver.c: (bus_driver_handle_service_exists):
11149 Simplify the code a bit.
11151 * dbus/dbus-bus.c: (dbus_bus_service_exists):
11154 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11157 Add libdbus-daemon.la and link to it.
11159 2003-02-01 James Willcox <jwillcox@gnome.org>
11161 * bus/driver.c: (bus_driver_handle_own_service):
11162 Actually include the service reply code in the message.
11164 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11166 * bus/driver.c: (bus_driver_handle_service_exists):
11167 Don't unref the incoming message.
11169 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11171 * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
11173 2003-02-02 Anders Carlsson <andersca@codefactory.se>
11175 * dbus/dbus-server.c: (dbus_server_listen):
11176 * dbus/dbus-transport.c: (_dbus_transport_open):
11177 ifdef out the calls to the debug transport and server.
11179 2003-02-02 Alexander Larsson <alexl@redhat.com>
11181 * dbus/dbus-watch.c (dbus_watch_get_flags):
11182 Add note in the docs that ERROR or HANGUP won't be returned
11183 and are assumed always on.
11185 * glib/dbus-gmain.c (add_watch):
11186 Always add IO_ERR | IO_HUP
11188 * dbus/dbus-message.h:
11189 Add semicolon after dbus_message_iter_get_string_array().
11190 Makes qt code build again
11192 2003-02-01 Anders Carlsson <andersca@codefactory.se>
11194 * bus/driver.c: (create_unique_client_name),
11195 (bus_driver_handle_hello):
11196 Don't take a name, just use a numeric id to identify
11199 * dbus/Makefile.am:
11200 * dbus/dbus-bus.c: (dbus_bus_register_client),
11201 (dbus_bus_acquire_service), (dbus_bus_service_exists):
11203 Add new convenience functions for communicating with the bus.
11205 * dbus/dbus-message.h:
11207 * dbus/dbus-protocol.h:
11210 2003-02-01 Alexander Larsson <alexl@redhat.com>
11212 * dbus/dbus-message.c (dbus_message_append_fields):
11213 Add some more doc comments.
11215 2003-02-01 Havoc Pennington <hp@pobox.com>
11217 * dbus/dbus-break-loader.c (randomly_modify_length): change
11218 a 4-byte value in the message as if it were a length
11220 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
11221 execute bit on saved files
11223 2003-02-01 Havoc Pennington <hp@pobox.com>
11225 * dbus/dbus-break-loader.c (main): new program to find messages
11226 that break the loader.
11228 * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
11229 * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
11231 * dbus/dbus-string.c (_dbus_string_set_byte): new
11233 2003-01-31 Havoc Pennington <hp@pobox.com>
11235 * dbus/dbus-message.c: refactor the test code to be more general,
11236 in preparation for writing a "randomly permute test cases to
11237 try to break the loader" program.
11239 2003-01-31 Havoc Pennington <hp@pobox.com>
11241 * doc/dbus-specification.sgml: work on the specification
11243 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
11244 the protocol version of the message.
11246 * dbus/dbus-protocol.h: drop special _REPLY names, the spec
11247 no longer specifies that.
11248 (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
11251 * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
11252 "break" for DBUS_TYPE_NIL, remove @todo
11254 2003-01-31 Havoc Pennington <hp@pobox.com>
11256 * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
11257 just set_is_error/get_is_error as this is a commonly-used
11258 function, and write docs.
11260 2003-01-31 Anders Carlsson <andersca@codefactory.se>
11262 * dbus/dbus-address.c: (dbus_address_entry_free):
11263 Free key and value lists.
11265 * dbus/dbus-internals.c: (_dbus_type_to_string):
11266 Add the types we didn't have.
11268 * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
11269 (_dbus_marshal_validate_arg):
11272 * dbus/dbus-message.c: (dbus_message_set_sender):
11273 Remove todo about being able to set sender to NULL.
11275 (dbus_message_set_is_error_reply),
11276 (dbus_message_get_is_error_reply):
11277 * dbus/dbus-message.h:
11280 * dbus/dbus-protocol.h:
11281 Add error reply flag.
11283 * test/data/valid-messages/opposite-endian.message:
11284 Add NIL type to test.
11286 2003-01-31 Havoc Pennington <hp@pobox.com>
11288 * doc/dbus-specification.sgml: fully specify the header. Add
11289 flags and major protocol version, and change header/body len to
11292 * dbus/dbus-message-builder.c (append_saved_length): append length
11295 * dbus/dbus-message.c (dbus_message_create_header): change header
11296 length and body length to unsigned. Add the new fields from the
11298 (_dbus_message_loader_return_buffer): unsigned header/body len
11300 2003-01-30 Havoc Pennington <hp@pobox.com>
11302 * dbus/dbus-auth.c: rework to use only REJECTED, no
11305 * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
11306 use REJECTED, suggested by Mark McLoughlin
11308 2003-01-30 Havoc Pennington <hp@pobox.com>
11310 * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
11311 a better way to report errors here. e.g. "unix address lacks
11312 path" or something. also "no such file" when the path doesn't
11315 * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
11317 (dbus_parse_address): add @todo about documenting address format,
11318 and allowing , and ; to be escaped
11320 2003-01-30 Anders Carlsson <andersca@codefactory.se>
11322 * dbus/Makefile.am:
11323 Add dbus-address.[ch]
11325 * dbus/dbus-address.c: (dbus_address_entry_free),
11326 (dbus_address_entries_free), (create_entry),
11327 (dbus_address_entry_get_method), (dbus_address_entry_get_value),
11328 (dbus_parse_address), (_dbus_address_test):
11329 * dbus/dbus-address.h:
11330 New files for dealing with address parsing.
11332 * dbus/dbus-connection.c:
11333 Document timeout functions.
11335 * dbus/dbus-message.c:
11336 Document dbus_message_new_from_message.
11338 * dbus/dbus-server-debug.c:
11341 * dbus/dbus-server.c: (dbus_server_listen):
11342 Parse address and use correct server implementation.
11344 * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
11345 * dbus/dbus-string.h:
11346 New function with test.
11348 * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
11349 * dbus/dbus-test.h:
11352 * dbus/dbus-transport-debug.c:
11355 * dbus/dbus-transport.c: (_dbus_transport_open):
11356 Parse address and use correct transport implementation.
11358 2003-01-30 Havoc Pennington <hp@pobox.com>
11360 * dbus/dbus-message.c: use message->byte_order instead of
11361 DBUS_COMPILER_BYTE_ORDER throughout.
11362 (dbus_message_create_header): pad header to align the
11363 start of the body of the message to 8-byte boundary
11365 * dbus/dbus-marshal.h: make all the demarshalers take const
11366 DBusString arguments.
11368 * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
11369 validate message args here, so we don't have to do slow validation
11370 later, and so we catch bad messages as they are incoming. Also add
11371 better checks on header_len and body_len. Also fill in
11372 message->byte_order
11374 * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
11375 implemented properly)
11376 (_dbus_string_validate_nul): new function to check all-nul
11378 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
11379 get_arg_end_pos and remove all validation
11380 (_dbus_marshal_validate_arg): actually do validation here.
11382 2003-01-29 Havoc Pennington <hp@pobox.com>
11384 * dbus/dbus-message.c (check_message_handling): fix assertion
11385 failure on set_client_serial
11387 2003-01-28 Havoc Pennington <hp@pobox.com>
11389 * dbus/dbus-server-debug.c: Add doc section comments
11391 * dbus/dbus-transport-debug.c: add doc section comments
11393 2003-01-28 Havoc Pennington <hp@redhat.com>
11395 * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
11396 the reverse order from how I had it
11397 (_dbus_string_base64_encode): reverse encoding order. I was
11398 basically byteswapping everything during encoding.
11400 2003-01-28 Anders Carlsson <andersca@codefactory.se>
11402 * dbus/dbus-connection-internal.h:
11403 * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
11404 (_dbus_connection_remove_timeout):
11405 Add functions for adding and removing timeouts.
11407 * dbus/dbus-message.c: (dbus_message_new_from_message):
11408 Add new function that takes a message and creates an exact
11409 copy of it, but with the refcount set to 1.
11410 (check_message_handling):
11413 * dbus/dbus-server-protected.h:
11414 * dbus/dbus-server.c: (_dbus_server_init_base),
11415 (_dbus_server_finalize_base), (_dbus_server_add_timeout),
11416 (dbus_server_set_timeout_functions):
11417 (_dbus_server_remove_timeout):
11418 New functions so that a server can add and remove timeouts.
11420 (dbus_server_listen):
11421 Add commented out call to dbus_server_debug_new.
11423 * dbus/dbus-timeout.c: (_dbus_timeout_new):
11424 Actually set the handler, doh.
11426 * dbus/dbus-transport.c: (_dbus_transport_open):
11427 Add commented out call to dbus_transport_debug_client_new.
11429 * dbus/Makefile.am:
11430 Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
11432 2003-01-28 Havoc Pennington <hp@pobox.com>
11434 * dbus/dbus-message.c (check_message_handling): function to check
11435 on the loaded message, iterates over it etc.
11437 2003-01-28 Havoc Pennington <hp@pobox.com>
11439 * test/Makefile.am (dist-hook): fix make distdir
11441 * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
11443 2003-01-27 Havoc Pennington <hp@pobox.com>
11445 * dbus/dbus-mempool.c (time_for_size): replace printf with
11448 * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
11449 empty lines; fix the SAVE_LENGTH stuff to be
11450 START_LENGTH/END_LENGTH so it actually works; couple other
11453 * test/Makefile.am (dist-hook): add dist-hook for .message files
11455 * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
11456 can be constant or locked.
11457 (_dbus_string_free): allow freeing a const string as
11458 documented/intended
11460 * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
11462 * dbus/dbus-test-main.c (main): take an argument which is the
11463 directory containing test data
11465 * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
11466 argument to this and load all the messages in test/data/
11467 checking that they can be loaded or not loaded as appropriate.
11469 2003-01-27 Anders Carlsson <andersca@codefactory.se>
11471 * bus/dispatch.c: (bus_dispatch_message_handler):
11472 Dispatch messages sent to services.
11474 * bus/driver.c: (bus_driver_send_service_deleted),
11475 (bus_driver_send_service_created), (bus_driver_send_service_lost),
11476 (bus_driver_send_service_acquired):
11477 Add helper functions for sending service related messages.
11479 (bus_driver_send_welcome_message):
11480 Send HELLO_REPLY instead of WELCOME.
11482 (bus_driver_handle_list_services):
11483 Send LIST_SERVICES_REPLY instead of SERVICES.
11485 (bus_driver_handle_own_service),
11486 (bus_driver_handle_service_exists):
11487 New message handlers.
11489 (bus_driver_handle_message):
11490 Invoke new message handlers.
11492 (bus_driver_remove_connection):
11493 Don't remove any services here since that's done automatically
11494 by bus_service_remove_owner now.
11497 New function signatures.
11499 * bus/services.c: (bus_service_add_owner):
11500 Send ServiceAcquired message if we're the only primary owner.
11502 (bus_service_remove_owner):
11503 Send ServiceAcquired/ServiceLost messages.
11505 (bus_service_set_prohibit_replacement),
11506 (bus_service_get_prohibit_replacement):
11507 Functions for setting prohibit replacement.
11509 (bus_service_has_owner):
11510 New function that checks if a connection is in the owner queue of
11514 Add new function signatures.
11516 * dbus/dbus-list.c: (_dbus_list_test):
11517 Add tests for _dbus_list_remove_last and traversing the list backwards.
11519 * dbus/dbus-list.h:
11520 Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
11521 go any further, so return NULL then.
11523 * dbus/dbus-protocol.h:
11524 Add new messages, service flags and service replies.
11526 2003-01-26 Havoc Pennington <hp@pobox.com>
11528 * dbus/dbus-message-builder.c: implement, completely untested.
11530 * test/data/*: add data to be used in testing.
11531 ".message" files are our simple loadable text format.
11532 ".message-raw" will be binary dumps of messages.
11534 * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
11536 2003-01-26 Havoc Pennington <hp@pobox.com>
11538 * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
11540 * dbus/dbus-errors.c (dbus_result_to_string): add
11543 * dbus/dbus-message-builder.c: new file, will contain code to load
11544 up messages from files. Not implemented yet.
11546 2003-01-26 Havoc Pennington <hp@pobox.com>
11548 * dbus/dbus-message.c (dbus_message_set_sender): support deleting
11549 the sender by setting to NULL
11551 2003-01-26 Havoc Pennington <hp@pobox.com>
11553 The unit tests pass, but otherwise untested. If it breaks, the
11554 tests should have been better. ;-)
11556 * bus/driver.c (bus_driver_handle_hello): return if we disconnect
11559 * dbus/dbus-message.c: redo everything so we maintain
11560 message->header as the only copy of the various fields.
11561 This avoids the possibility of out-of-memory in some cases,
11562 for example dbus_message_lock() can't run out of memory anymore,
11563 and avoids extra copying. Figured I may as well go ahead and do
11564 this since it was busted for dbus_message_lock to not return
11565 failure on OOM, and dbus_message_write_header was totally
11566 unchecked for OOM. Also fixed some random other bugs.
11568 * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
11569 that strings are nul-terminated. Also, end_pos can be equal
11570 to string length just not greater than, I think.
11571 (_dbus_marshal_set_int32): new function
11572 (_dbus_marshal_set_uint32): new function
11573 (_dbus_marshal_set_string): new function
11575 * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
11576 a warning, init timeout_list to NULL
11577 (dbus_connection_send_message): don't use uninitialized variable
11580 * dbus/dbus-string.c (_dbus_string_replace_len): new function
11582 2003-01-26 Anders Carlsson <andersca@codefactory.se>
11584 * bus/driver.c: (bus_driver_handle_hello),
11585 (bus_driver_send_welcome_message):
11588 2003-01-26 Anders Carlsson <andersca@codefactory.se>
11590 * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
11591 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
11592 (dbus_connection_unref):
11593 * dbus/dbus-marshal.c: (_dbus_marshal_test):
11594 * dbus/dbus-message.c: (dbus_message_unref),
11597 (dbus_message_get_fields):
11598 Remove debugging printout.
11600 (_dbus_message_loader_return_buffer):
11601 Don't store the header string.
11603 (_dbus_message_test):
11606 2003-01-26 Richard Hult <rhult@codefactory.se>
11608 * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
11609 the file descriptor list, since it can change under us.
11611 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11613 * glib/dbus-gmain.c: (dbus_connection_prepare),
11614 (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
11615 (remove_watch), (dbus_connection_hookup_with_g_main):
11616 Rewrite the glib handling to use its own GSource instead of a
11617 GIOChannel so we can catch messages put in the queue while waiting
11620 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11623 * bus/connection.c: (connection_disconnect_handler),
11624 (connection_watch_callback), (bus_connection_setup):
11625 * bus/dispatch.c: (send_one_message),
11626 (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
11627 (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
11629 * bus/driver.c: (bus_driver_send_service_deleted),
11630 (bus_driver_send_service_created), (bus_driver_handle_hello),
11631 (bus_driver_send_welcome_message),
11632 (bus_driver_handle_list_services), (bus_driver_remove_connection),
11633 (bus_driver_handle_message):
11635 Refactor code, put the message dispatching in its own file. Use
11636 _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
11639 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11641 * dbus/dbus-internals.h:
11642 Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
11644 * dbus/dbus-message.c: (dbus_message_get_sender):
11645 * dbus/dbus-message.h:
11646 Implement dbus_message_get_sender.
11648 * dbus/dbus-protocol.h:
11649 Add message and service defines.
11651 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11653 * dbus/dbus-connection.c: (dbus_connection_send_message):
11654 * dbus/dbus-message-internal.h:
11655 * dbus/dbus-message.c: (_dbus_message_get_client_serial),
11656 (dbus_message_write_header):
11657 Remove _dbus_messag_unlock and don't set the client serial on a
11658 message if one already exists.
11660 2003-01-24 Havoc Pennington <hp@pobox.com>
11662 * dbus/dbus-list.c (alloc_link): put a thread lock on the global
11665 * bus/driver.c (bus_driver_handle_list_services): fix a leak
11668 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11670 * dbus/dbus-list.c: (alloc_link), (free_link):
11671 Use a memory pool for the links.
11673 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11675 * bus/connection.c: (bus_connection_foreach):
11676 * bus/connection.h:
11677 Add new bus_connection_foreach function.
11679 * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
11680 Add function that broadcasts a message to all clients.
11682 (bus_driver_send_service_created), (bus_driver_handle_hello),
11683 (bus_driver_send_welcome_message),
11684 (bus_driver_handle_list_services), (bus_driver_message_handler):
11685 Implement functions that take care of listing services, and notifying
11686 clients when new services are created.
11688 * bus/services.c: (bus_services_list):
11690 Add new function that returns an array of strings with the currently
11691 registered services.
11693 * glib/dbus-glib.h:
11694 * glib/dbus-gmain.c:
11695 Update copyright year.
11697 2003-01-25 Anders Carlsson <andersca@codefactory.se>
11699 * dbus/dbus-connection.c: (dbus_connection_send_message):
11700 Unlock the message in case it was sent earlier.
11702 (dbus_connection_send_message_with_reply_and_block):
11703 Remove the reply message from the list.
11705 * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
11706 Set array_len and new_pos correctly.
11708 (_dbus_marshal_test):
11709 Remove debug output.
11711 * dbus/dbus-message-internal.h:
11712 * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
11713 New function that returns the reply serial.
11715 (_dbus_message_unlock):
11716 New function that unlocks a message and resets its header.
11718 (dbus_message_append_string_array),
11719 (dbus_message_get_fields_valist),
11720 (dbus_message_iter_get_field_type),
11721 (dbus_message_iter_get_string_array),
11722 (dbus_message_get_fields),
11723 (dbus_message_append_fields_valist):
11724 Handle string arrays.
11726 (dbus_message_set_sender):
11727 Make this function public since the bus daemon needs it.
11729 (decode_header_data):
11730 Set the reply serial to -1 initially.
11732 * dbus/dbus-message.h:
11733 Add dbus_message_set_sender.
11735 2003-01-24 Havoc Pennington <hp@pobox.com>
11737 * doc/dbus-specification.sgml: add some stuff
11739 2003-01-22 Havoc Pennington <hp@pobox.com>
11741 * doc/dbus-specification.sgml: Start to document the protocol.
11743 2003-01-22 Havoc Pennington <hp@pobox.com>
11745 * dbus/dbus-connection.c
11746 (dbus_connection_send_message_with_reply_and_block): add some @todo
11748 * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
11750 2003-01-21 Havoc Pennington <hp@pobox.com>
11752 (patch untested because can't compile)
11754 * bus/driver.c (create_unique_client_name): make this function
11755 never recycle client names. Also, caller should initialize
11758 * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
11760 2003-01-21 Anders Carlsson <andersca@codefactory.se>
11762 * dbus/dbus-marshal.c: (_dbus_marshal_double),
11763 (_dbus_marshal_int32), (_dbus_marshal_uint32),
11764 (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
11765 (_dbus_marshal_double_array), (_dbus_marshal_string_array),
11766 (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
11767 (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
11768 (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
11769 * dbus/dbus-marshal.h:
11770 * dbus/dbus-protocol.h:
11771 Add support for marshalling and demarshalling integer, double
11774 2003-01-21 Anders Carlsson <andersca@codefactory.se>
11779 * bus/connection.c: (connection_disconnect_handler):
11780 Remove the connection from the bus driver's list.
11782 (connection_watch_callback): Dispatch messages.
11784 (free_connection_data): Free connection name.
11786 (bus_connection_setup): Add connection to the bus driver's list.
11787 (bus_connection_remove_owned_service):
11788 (bus_connection_set_name), (bus_connection_get_name):
11789 Add functions for setting and getting the connection's name.
11791 * bus/connection.h:
11792 Add function headers.
11794 * bus/driver.c: (create_unique_client_name),
11795 (bus_driver_handle_hello_message),
11796 (bus_driver_send_welcome_message), (bus_driver_message_handler),
11797 (bus_driver_add_connection), (bus_driver_remove_connection):
11800 * bus/services.c: (bus_service_free):
11802 New file that handles communication and registreation with the bus
11805 2003-01-21 Anders Carlsson <andersca@codefactory.se>
11807 * dbus/dbus-connection.c: (dbus_connection_send_message):
11808 Add a new client_serial parameter.
11810 (dbus_connection_send_message_with_reply):
11811 Remove a @todo since we've implemented the blocking function.
11813 (dbus_connection_send_message_with_reply_and_block):
11814 New function that sends a message and waits for a reply and
11815 then returns the reply.
11817 * dbus/dbus-connection.h:
11820 * dbus/dbus-errors.c: (dbus_result_to_string):
11821 * dbus/dbus-errors.h:
11822 Add new DBUS_RESULT.
11824 * dbus/dbus-message-internal.h:
11825 * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
11826 (_dbus_message_set_sender), (dbus_message_write_header),
11827 (dbus_message_new_reply), (decode_header_data),
11828 (_dbus_message_loader_return_buffer), (_dbus_message_test):
11829 * dbus/dbus-message.h:
11830 Add new functions that set the reply serial and sender.
11831 Also marshal and demarshal them correctly and add test.
11833 * dbus/dbus-protocol.h:
11834 Add new DBUS_MESSAGE_TYPE_SENDER.
11836 * glib/dbus-glib.h:
11837 * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
11838 (add_watch), (remove_watch), (add_timeout), (remove_timeout),
11839 (dbus_connection_hookup_with_g_main):
11840 * glib/test-dbus-glib.c: (main):
11841 Rewrite to use GIOChannel and remove the GSource crack.
11843 * test/echo-client.c: (main):
11844 * test/watch.c: (check_messages):
11845 Update for changed APIs
11847 2003-01-19 Anders Carlsson <andersca@codefactory.se>
11849 * dbus/Makefile.am: Add dbus-timeout.[cħ]
11851 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
11852 Create a DBusTimeoutList.
11853 (dbus_connection_set_timeout_functions): Add new function to
11854 set timeout callbacks
11856 * dbus/dbus-connection.h: Add public DBusTimeout API.
11858 * dbus/dbus-message.c: (dbus_message_get_service):
11859 * dbus/dbus-message.h: New function.
11861 * dbus/dbus-server.c: Fix small doc typo.
11863 * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
11865 2003-01-19 Anders Carlsson <andersca@codefactory.se>
11867 * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
11868 of the string, just as long as specified.
11870 2003-01-19 Havoc Pennington <hp@pobox.com>
11872 * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
11875 * dbus/dbus-server.c (dbus_server_set_max_connections)
11876 (dbus_server_get_max_connections, dbus_server_get_n_connections):
11877 keep track of current number of connections, and add API for
11878 setting a max (but haven't implemented enforcing the max yet)
11880 2003-01-18 Havoc Pennington <hp@pobox.com>
11882 * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
11883 reading/writing if read_watch != NULL or write_watch != NULL.
11885 * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
11886 the message loader code to actually load message->header and
11887 message->body into the newly-created message.
11889 * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
11892 * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
11893 (dbus_connection_get_max_message_size)
11894 (dbus_connection_set_max_live_messages_size)
11895 (dbus_connection_get_max_live_messages_size): implement some
11896 resource limitation functions
11898 * dbus/dbus-resources.c: new file implementing some of the
11899 resource limits stuff
11901 * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
11902 missing docs, add @todo to handle OOM etc.
11904 * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
11907 2003-01-18 Havoc Pennington <hp@pobox.com>
11909 * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
11910 connection if it hasn't been already.
11912 * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
11913 replace with DisconnectFunction.
11915 2003-01-18 Havoc Pennington <hp@pobox.com>
11917 Building --disable-verbose-mode --disable-asserts --disable-tests
11918 cuts the library from 112K to 45K or so
11920 * configure.in: check for varargs macro support,
11921 add --enable-verbose-mode, --enable-asserts.
11923 * dbus/dbus-internals.h (_dbus_assert): support
11924 DBUS_DISABLE_ASSERT
11925 (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
11927 2003-01-18 Havoc Pennington <hp@pobox.com>
11929 * dbus/dbus-test.c: include config.h so that tests actually run
11931 * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
11932 so the failure mode when that assumption fails will be plenty
11935 2003-01-18 Havoc Pennington <hp@pobox.com>
11937 * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
11939 * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
11942 * test/Makefile.am: don't use special variable "TESTS" for echo-*
11943 since we don't want to use those in make check
11945 2003-01-15 Havoc Pennington <hp@redhat.com>
11951 2003-01-15 Havoc Pennington <hp@redhat.com>
11953 * test/Makefile.am: fix so that test source code ends up in the
11954 distribution on make distcheck
11956 2003-01-15 Havoc Pennington <hp@redhat.com>
11962 2003-01-15 Havoc Pennington <hp@redhat.com>
11964 * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
11965 fix build when --disable-tests
11967 * Makefile.am (EXTRA_DIST): put HACKING in here
11969 * HACKING: document procedure for making a tarball release.
11971 2003-01-14 Anders Carlsson <andersca@codefactory.se>
11973 * bus/connection.c: (connection_error_handler),
11974 (bus_connection_setup):
11975 * bus/main.c: (main):
11976 Make sure that the DBusConnectionData struct is NULLed
11977 out to prevent a segfault.
11979 * dbus/dbus-errors.c: (dbus_result_to_string):
11980 * dbus/dbus-errors.h:
11981 * dbus/dbus-message.c: (dbus_message_get_fields),
11982 (dbus_message_get_fields_valist), (_dbus_message_test):
11983 * dbus/dbus-message.h:
11984 Make dbus_message_get_fields return a result code so we can
11985 track invalid fields as well as oom.
11987 2003-01-11 Havoc Pennington <hp@pobox.com>
11989 * configure.in: change --enable-test/--enable-ansi action-if-given
11990 to enable_foo=$enableval instead of enable_foo=yes
11992 2003-01-08 Havoc Pennington <hp@pobox.com>
11994 * dbus/dbus-string.c (_dbus_string_align_length): new function
11996 * dbus/dbus-test-main.c: move main() for test app here
11998 (dbus_internal_symbol_do_not_use_run_tests): we have to export a
11999 symbol to run tests, because dbus-test isn't in the main
12002 Code review nitpicks.
12004 * dbus/dbus-message.c (dbus_message_write_header): add newlines
12005 for people with narrow emacs ;-). Assert client_serial was filled
12006 in. Assert message->name != NULL.
12007 (dbus_message_append_fields): have "first_field_type" arg separate
12008 from va list, needed for C++ binding that also uses varargs IIRC
12009 and helps with type safety
12010 (dbus_message_new): add @todo about using DBusString to store
12011 service/name internally
12012 (dbus_message_new): don't leak ->service and ->name on OOM later
12014 (dbus_message_unref): free the service name
12015 (dbus_message_get_fields): same change to varargs
12016 i.e. first_field_type
12017 (_dbus_message_loader_return_buffer): assert that the message data
12018 is aligned (if not it's a bug in our code). Put in verbose griping
12019 about why we set corrupted = TRUE.
12020 (decode_header_data): add FIXME that char* is evil. Was going to
12021 add FIXME about evil locale-specific string.h strncmp, but just
12022 switched to wacky string-as-uint32 optimization. Move check for
12023 "no room for field name" above get_const_data_len() to avoid
12024 assertion failure in get_const_data_len if we have trailing 2
12025 bytes or the like. Check for service and name fields being
12026 provided twice. Don't leak service/name on error. Require field
12027 names to be aligned to 4 bytes.
12029 * dbus/dbus-marshal.c: move byte swap stuff to header
12030 (_dbus_pack_int32): uscore-prefix
12031 (_dbus_unpack_int32): uscore-prefix
12032 (_dbus_unpack_uint32): export
12033 (_dbus_demarshal_string): add @todo complaining about use of
12035 (_dbus_marshal_get_field_end_pos): add @todo about bad error
12036 handling allowing corrupt data to go unchecked
12038 2003-01-08 Havoc Pennington <hp@redhat.com>
12040 * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
12041 to the select() as needed for authentication. (should be using
12042 _dbus_poll() not select, but for another day)
12044 * dbus/dbus.h: include dbus/dbus-protocol.h
12046 2003-01-08 Anders Carlsson <andersca@codefactory.se>
12048 * dbus/Makefile.am (dbusinclude_HEADERS): Install
12051 2003-01-08 Anders Carlsson <andersca@codefactory.se>
12053 * dbus/dbus-internals.c: (_dbus_type_to_string):
12054 New function that returns a string describing a type.
12056 * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
12057 * dbus/dbus-marshal.h:
12058 * dbus/dbus-message.c: (dbus_message_get_fields_valist),
12059 (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
12060 (dbus_message_iter_get_byte_array):
12061 * dbus/dbus-message.h:
12062 Add new convenience functions for appending and getting message fields.
12063 Also add demarshalling routines for byte arrays.
12065 2003-01-07 Anders Carlsson <andersca@codefactory.se>
12067 * dbus/dbus-connection-internal.h:
12068 * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
12069 (_dbus_connection_get_next_client_serial),
12070 (dbus_connection_send_message):
12071 * dbus/dbus-internals.h:
12072 * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
12073 (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
12074 (_dbus_marshal_uint32), (_dbus_demarshal_double),
12075 (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
12076 (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
12077 (_dbus_verbose_bytes), (_dbus_marshal_test):
12078 * dbus/dbus-marshal.h:
12079 * dbus/dbus-message-internal.h:
12080 * dbus/dbus-message.c: (_dbus_message_set_client_serial),
12081 (dbus_message_write_header), (_dbus_message_lock),
12082 (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
12083 (dbus_message_get_name), (dbus_message_append_int32),
12084 (dbus_message_append_uint32), (dbus_message_append_double),
12085 (dbus_message_append_string), (dbus_message_append_byte_array),
12086 (dbus_message_get_fields_iter), (dbus_message_iter_ref),
12087 (dbus_message_iter_unref), (dbus_message_iter_has_next),
12088 (dbus_message_iter_next), (dbus_message_iter_get_field_type),
12089 (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
12090 (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
12091 (decode_header_data), (_dbus_message_loader_return_buffer),
12092 (message_iter_test), (_dbus_message_test):
12093 * dbus/dbus-message.h:
12094 * dbus/dbus-protocol.h:
12095 * dbus/dbus-test.c: (main):
12096 * dbus/dbus-test.h:
12097 * glib/test-dbus-glib.c: (message_handler), (main):
12098 * test/echo-client.c: (main):
12099 * test/watch.c: (check_messages):
12100 Make messages sendable and receivable for real.
12102 2003-01-07 Anders Carlsson <andersca@codefactory.se>
12104 * dbus/dbus-marshal.c: (_dbus_marshal_double),
12105 (_dbus_marshal_string), (_dbus_marshal_byte_array):
12106 * dbus/dbus-message.c: (dbus_message_append_int32),
12107 (dbus_message_append_uint32), (dbus_message_append_double),
12108 (dbus_message_append_string), (dbus_message_append_byte_array):
12109 Handle OOM restoration.
12111 2003-01-07 Anders Carlsson <andersca@codefactory.se>
12113 * dbus/dbus-marshal.c: (_dbus_marshal_string),
12114 (_dbus_demarshal_string), (_dbus_marshal_test):
12115 * dbus/dbus-marshal.h:
12116 * dbus/dbus-message.c: (dbus_message_get_name),
12117 Document these functions.
12119 (dbus_message_append_int32), (dbus_message_append_uint32),
12120 (dbus_message_append_double), (dbus_message_append_string),
12121 (dbus_message_append_byte_array):
12122 * dbus/dbus-message.h:
12123 Add functions for adding message fields of different types.
12125 * dbus/dbus-protocol.h:
12126 Add the different types.
12128 2003-01-05 Havoc Pennington <hp@pobox.com>
12130 * bus/connection.c: implement routines for handling connections,
12131 first thing is keeping a list of owned services on each connection
12132 and setting up watches etc.
12134 * bus/services.c: implement a mapping from service names to lists
12137 * dbus/dbus-hash.c: add DBUS_HASH_POINTER
12139 * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
12140 to use static mutexes for global data
12142 * dbus/dbus-connection.c (dbus_connection_set_data): add new
12143 collection of functions to set/get application-specific data
12144 on the DBusConnection.
12146 2003-01-04 Havoc Pennington <hp@pobox.com>
12148 * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
12149 (_dbus_poll): new function
12151 * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
12154 * bus/loop.c: initial code for the daemon main loop
12156 2003-01-04 Havoc Pennington <hp@pobox.com>
12158 * test/watch.c (error_handler): make it safe if the error handler
12159 is called multiple times (if we s/error handler/disconnect
12160 handler/ we should just guarantee it's called only once)
12162 * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
12163 error handler on disconnect (it's quite possible we should
12164 just change the error handler to a "disconnect handler," I'm
12165 not sure we have any other meaningful errors)
12167 * configure.in: check for getpwnam_r
12169 * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
12170 dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
12171 mechanism as in SASL spec, using socket credentials
12173 * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
12174 (_dbus_send_credentials_unix_socket): new function
12176 * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
12178 (_dbus_write): only check errno if <0 returned
12179 (_dbus_write_two): ditto
12181 2003-01-02 Anders Carlsson <andersca@codefactory.se>
12183 * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
12184 (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
12185 (_dbus_marshal_test):
12186 * dbus/dbus-marshal.h:
12187 Add _dbus_marshal_byte_array and rename _dbus_marshal_string
12188 to _dbus_marshal_utf8_string. Also fix some tests.
12190 2002-12-28 Harri Porten <porten@kde.org>
12192 * configure.in: added check for C++ compiler and a very cheesy
12193 check for the Qt integration
12195 * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
12197 * qt/Makefile.am: added
12199 * qt/.cvsignore: added
12201 * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
12202 latter, added #ifdef QT_THREAD_SUPPORT guard.
12204 * dbus/Makefile.am: added missing headers for make dist
12206 2002-12-28 Kristian Rietveld <kris@gtk.org>
12208 * dbus/Makefile.am: fixup export-symbols-regex.
12210 2002-12-27 Anders Carlsson <andersca@codefactory.se>
12212 * acinclude.m4: Add this file and put the
12213 PKG_CHECK_MODULE macro in it.
12215 2002-12-27 Anders Carlsson <andersca@codefactory.se>
12217 * dbus/dbus-marshal.c: (_dbus_marshal_string),
12218 (_dbus_demarshal_double), (_dbus_demarshal_int32),
12219 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
12220 (_dbus_marshal_test):
12221 Make the demarshalling routines align the pos argument.
12222 Add string marshalling tests and fix the obvious bugs
12225 2002-12-26 Havoc Pennington <hp@pobox.com>
12227 * dbus/dbus-auth.c: fixes fixes fixes
12229 * dbus/dbus-transport-unix.c: wire up support for
12230 encoding/decoding data on the wire
12232 * dbus/dbus-auth.c (_dbus_auth_encode_data)
12233 (_dbus_auth_decode_data): append to target string
12234 instead of nuking it.
12236 2002-12-26 Havoc Pennington <hp@pobox.com>
12238 * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
12239 WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
12242 * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
12243 avoid swap_bytes() overhead (ignoring possible assembly stuff for
12244 now). Main point is because I wanted unpack_uint32 to implement
12245 _dbus_verbose_bytes
12246 (_dbus_verbose_bytes): new function
12248 * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
12250 * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
12251 mechanism to handle a corrupt message stream
12252 (_dbus_message_loader_new): fix preallocation to only prealloc,
12255 * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
12256 (_dbus_string_test): enhance tests for copy/move and fix the
12259 * dbus/dbus-transport-unix.c: Hold references in more places to
12260 avoid reentrancy problems
12262 * dbus/dbus-transport.c: ditto
12264 * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
12265 leak reference count in no-message case
12267 * test/watch.c (do_mainloop): handle adding/removing watches
12268 during iteration over the watches. Also, ref the connection/server
12269 stored on a watch, so we don't try to mangle a destroyed one.
12271 * dbus/dbus-transport-unix.c (do_authentication): perform
12274 * dbus/dbus-auth.c (get_state): add a state
12275 AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
12276 (_dbus_auth_get_unused_bytes): append the unused bytes
12277 to the passed in string, rather than prepend
12279 * dbus/dbus-transport.c (_dbus_transport_init_base): create
12280 the auth conversation DBusAuth
12282 * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
12283 (_dbus_transport_new_for_domain_socket): when creating a
12284 transport, pass in whether it's a client-side or server-side
12285 transport so we know which DBusAuth to create
12287 2002-12-03 Havoc Pennington <hp@pobox.com>
12289 * dbus/dbus-transport-unix.c (unix_finalize): finalize base
12290 _after_ finalizing the derived members
12291 (unix_connection_set): unref watch if we fail to add it
12293 * dbus/dbus-connection.c (dbus_connection_unref): delete the
12294 transport first, so that the connection owned by the
12295 transport will be valid as the transport finalizes.
12297 * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
12298 if necessary, and remove watches from the connection.
12300 * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
12302 2002-12-26 Anders Carlsson <andersca@codefactory.se>
12304 * dbus/dbus-marshal.c: (_dbus_marshal_string),
12305 (_dbus_demarshal_double), (_dbus_demarshal_int32),
12306 (_dbus_demarshal_uint32), (_dbus_demarshal_string),
12307 (_dbus_marshal_test):
12308 * dbus/dbus-marshal.h:
12309 Add string marshal functions and have the demarshal functions
12310 return the new position.
12312 2002-12-25 Havoc Pennington <hp@pobox.com>
12314 * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
12315 it is a simple protocol that just maps directly to SASL.
12317 * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
12318 initial implementation, not actually used yet.
12320 * dbus/dbus-string.c (_dbus_string_find): new function
12321 (_dbus_string_equal): new function
12322 (_dbus_string_base64_encode): new function
12323 (_dbus_string_base64_decode): new function
12325 2002-12-25 Anders Carlsson <andersca@codefactory.se>
12327 * dbus/Makefile.am:
12328 * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
12329 (_dbus_marshal_int32), (_dbus_marshal_uint32),
12330 (_dbus_demarshal_double), (_dbus_demarshal_int32),
12331 (_dbus_demarshal_uint32), (_dbus_marshal_test):
12332 * dbus/dbus-marshal.h:
12333 * dbus/dbus-protocol.h:
12334 * dbus/dbus-test.c: (main):
12335 * dbus/dbus-test.h:
12336 Add un-optimized marshalling/demarshalling routines.
12338 2002-12-25 Harri Porten <porten@kde.org>
12340 * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
12342 2002-12-24 Zack Rusin <zack@kde.org>
12344 * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
12345 * qt/dbus-qt.h: skeleton with two sample implemenatation of the
12348 2002-12-24 Havoc Pennington <hp@pobox.com>
12350 * glib/dbus-gthread.c: fix include
12352 * glib/dbus-glib.h: rename DBusMessageHandler for now.
12353 I think glib API needs to change, though, as you don't
12354 want to use DBusMessageFunction, you want to use the
12355 DBusMessageHandler object. Probably
12356 dbus_connection_open_with_g_main_loop()
12357 and dbus_connection_setup_g_main_loop() or something like that
12358 (but think of better names...) that just create a connection
12359 that has watch/timeout functions etc. already set up.
12361 * dbus/dbus-connection.c
12362 (dbus_connection_send_message_with_reply): new function just to
12363 show how the message handler helps us deal with replies.
12365 * dbus/dbus-list.c (_dbus_list_remove_last): new function
12367 * dbus/dbus-string.c (_dbus_string_test): free a string that
12370 * dbus/dbus-hash.c: use memory pools for the hash entries
12371 (rebuild_table): be more paranoid about overflow, and
12372 shrink table when we can
12373 (_dbus_hash_test): reduce number of sprintfs and write
12374 valid C89. Add tests for case where we grow and then
12375 shrink the hash table.
12377 * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
12379 * dbus/dbus-connection.c (dbus_connection_register_handler)
12380 (dbus_connection_unregister_handler): new functions
12382 * dbus/dbus-message.c (dbus_message_get_name): new
12384 * dbus/dbus-list.c: fix docs typo
12386 * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
12387 an object representing a handler for messages.
12389 2002-12-16 Anders Carlsson <andersca@codefactory.se>
12391 * glib/dbus-glib.h:
12392 * glib/dbus-gthread.c: (dbus_gthread_init):
12393 Don't use the gdbus prefix for public functions.
12395 2002-12-16 Anders Carlsson <andersca@codefactory.se>
12399 Add GLib checks and fixup .pc files
12401 * glib/Makefile.am:
12402 * glib/dbus-glib.h:
12403 * glib/dbus-gmain.c: (gdbus_connection_prepare),
12404 (gdbus_connection_check), (gdbus_connection_dispatch),
12405 (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
12406 (dbus_connection_gsource_new):
12407 * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
12408 (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
12409 * glib/test-dbus-glib.c: (message_handler), (main):
12412 2002-12-15 Harri Porten <porten@kde.org>
12414 * autogen.sh: check for libtoolize before attempting to use it
12416 * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
12419 * .cvsignore: ignore more stamp files
12421 * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
12423 * test/Makefile.am: added -I$(top_srcdir) to be able to compile
12424 without make install.
12426 2002-12-15 Havoc Pennington <hp@pobox.com>
12428 * dbus/dbus-threads.c: add thread stubs that a higher library
12429 layer can fill in. e.g. the GLib wrapper might fill them in with
12430 GThread stuff. We still need to use this thread API to
12431 thread-safe-ize the library.
12433 2002-12-12 Havoc Pennington <hp@pobox.com>
12435 * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
12436 below new interfaces and include fewer system headers.
12438 * dbus/dbus-sysdeps.c (_dbus_read): new function
12439 (_dbus_write): new function
12440 (_dbus_write_two): new function
12441 (_dbus_connect_unix_socket): new function
12442 (_dbus_listen_unix_socket): new function
12444 * dbus/dbus-message-internal.h: change interfaces to use
12447 2002-12-11 Havoc Pennington <hp@pobox.com>
12449 * dbus/dbus-types.h: add dbus_unichar
12451 * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
12453 * dbus/dbus-connection.c (dbus_connection_send_message): return
12456 * dbus/dbus-transport.c: include dbus-watch.h
12458 * dbus/dbus-connection.c: include dbus-message-internal.h
12460 * HACKING: add file with coding guidelines stuff.
12462 * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
12463 handling here, for security purposes (as in vsftpd). Not actually
12464 using this class yet.
12466 * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
12467 system/libc usage here, as in vsftpd, for ease of auditing (and
12468 should also simplify portability). Haven't actually moved all the
12469 system/libc usage into here yet.
12471 2002-11-25 Havoc Pennington <hp@pobox.com>
12473 * dbus/dbus-internals.c (_dbus_verbose): fix to not
12474 always print the first verbose message.
12476 2002-11-24 Havoc Pennington <hp@pobox.com>
12478 * test/echo-client.c, test/echo-server.c: cheesy test
12481 * configure.in (AC_CHECK_FUNCS): check for writev
12483 * dbus/dbus-message.c (_dbus_message_get_network_data): new
12486 * dbus/dbus-list.c (_dbus_list_foreach): new function
12488 * dbus/dbus-internals.c (_dbus_verbose): new function
12490 * dbus/dbus-server.c, dbus/dbus-server.h: public object
12491 representing a server that listens for connections.
12493 * dbus/.cvsignore: create
12495 * dbus/dbus-errors.h, dbus/dbus-errors.c:
12496 public API for reporting errors
12498 * dbus/dbus-connection.h, dbus/dbus-connection.c:
12499 public object representing a connection that
12500 sends/receives messages. (Same object used for
12501 both client and server.)
12503 * dbus/dbus-transport.h, dbus/dbus-transport.c:
12504 Basic abstraction for different kinds of stream
12505 that we might read/write messages from.
12507 2002-11-23 Havoc Pennington <hp@pobox.com>
12509 * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
12512 * dbus/dbus-test.c (main): add list test, and include
12513 dbus-test.h as intended
12515 * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
12516 (_dbus_hash_table_remove_int): return value indicates
12517 whether the entry existed to remove
12519 * dbus/dbus-list.c: add linked list utility class,
12520 with docs and tests
12522 * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
12525 2002-11-23 Havoc Pennington <hp@pobox.com>
12527 * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
12528 DBUS_END_DECLS to nothing, that should fix this once and for all
12530 * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
12532 * dbus/dbus-message.c, dbus/dbus-hash.c:
12533 add some missing @brief
12535 2002-11-23 Havoc Pennington <hp@pobox.com>
12537 * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
12538 to avoid confusing Doxygen
12540 * dbus/dbus-hash.c: @} not }@
12542 * dbus/dbus-message.c (struct DBusMessage): split out
12545 2002-11-23 Havoc Pennington <hp@pobox.com>
12547 * configure.in: pile on more warning flags if using gcc
12549 * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
12550 to document static functions
12552 * configure.in: add summary to end of configure so it
12553 looks nice and attractive
12555 * dbus/dbus-hash.c: finish implementation and write unit
12558 * configure.in: add --enable-tests to enable unit tests
12560 * dbus/dbus-test.c: test program to run unit tests
12561 for all files in dbus/*, initially runs a test for
12564 * dbus/dbus-internals.h: file to hold some internal utility stuff
12566 2002-11-22 Havoc Pennington <hp@redhat.com>
12568 * dbus/dbus-hash.c: copy in Tcl hash table, not yet
12569 "ported" away from Tcl
12571 * dbus/dbus-types.h: header for types such as dbus_bool_t
12573 2002-11-22 Havoc Pennington <hp@redhat.com>
12575 * dbus/dbus.h: fixups for doc warnings
12577 * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
12579 (QUIET): make it quiet so we can see warnings
12581 * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
12583 2002-11-22 Havoc Pennington <hp@redhat.com>
12585 * Makefile.am: include "Doxyfile" target in all-local
12587 * configure.in: generate the Doxyfile
12589 * Doxyfile.in: move Doxyfile here, so we can use
12590 configure to generate a Doxyfile with the right
12591 version number etc.
12593 2002-11-22 Havoc Pennington <hp@redhat.com>
12595 * dbus/dbus-message.c: move inline docs into .c file
12597 * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
12598 so all docs are under doc/
12599 (MAN_EXTENSION): generate man pages. Use extension
12600 ".3dbus" which matches ".3qt" on my system,
12601 I guess this is OK, I don't know really.
12602 (FILE_PATTERNS): look for .c files not .h, makes sense
12603 for plain C I think
12605 2002-11-22 Havoc Pennington <hp@pobox.com>
12607 * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
12608 because any app can be a server, and any app can be a client,
12609 the bus is a special kind of server.
12611 Thu Nov 21 23:35:31 2002 Zack Rusin <zack@kde.org>
12613 * Doxyfile : adding. Still needs Makefile rules to be generated
12614 automatically (just run "doxygen" in the toplevel dir for now to
12617 * dbus/dbus-message.h : Adding sample docs (javadoc since
12618 resembles gtk-doc a little more)
12620 * dbus/dbus.h : Adding sample docs
12622 2002-11-21 Havoc Pennington <hp@redhat.com>
12624 * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
12625 so we can allow ourselves to include files directly,
12626 instead of having to use dbus.h
12628 * dbus/dbus.h: fill in
12630 * dbus/dbus-message.h: sketch out a sample header file.
12631 Include griping if you include it directly instead of
12634 * dbus/dbus-macros.h: new file with macros for extern "C",
12635 TRUE/FALSE, NULL, etc.
12637 * doc/file-boilerplate.c: put include guards in here
12639 2002-11-21 Havoc Pennington <hp@redhat.com>
12641 * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
12643 * COPYING: include the GPL as well, and license code
12644 under both AFL and GPL.
12646 2002-11-21 Havoc Pennington <hp@redhat.com>
12648 * acconfig.h: get rid of this
12650 * autogen.sh (run_configure): add --no-configure option
12652 * configure.in: remove AC_ARG_PROGRAM to make
12653 autoconf complain less. add AC_PREREQ.
12654 add AC_DEFINE third arg.
12656 2002-11-21 Anders Carlsson <andersca@codefactory.se>
12659 Fix references so we can distcheck.
12661 2002-11-21 Havoc Pennington <hp@redhat.com>
12663 * Initial module creation