Havoc Pennington [Wed, 15 Feb 2006 16:38:11 +0000 (16:38 +0000)]
add dispatch recursion item to TODO
Thiago Macieira [Wed, 15 Feb 2006 16:25:12 +0000 (16:25 +0000)]
Merge the changes to the bindings from the KDE Subversion server.
This is a major change: library is source- and binary-incompatible to
what it used to be.
All testcases are green, functionality is preserved.
It is not feature-complete. Development will continue in the branch in the
Subversion server for a while.
Thiago Macieira [Wed, 15 Feb 2006 16:21:59 +0000 (16:21 +0000)]
Unclutter and upgrade the test to Qt 4.1. We now link to QtXml too.
Robert McQueen [Mon, 13 Feb 2006 22:30:11 +0000 (22:30 +0000)]
2006-02-13 Robert McQueen <robot101@debian.org>
* glib/dbus-binding-tool-glib.c, glib/dbus-gmain.c,
glib/dbus-gsignature.c, glib/dbus-gtype-specialized.c,
glib/dbus-gtype-specialized.h, glib/dbus-gvalue-utils.c,
glib/dbus-gvalue-utils.h, glib/dbus-gvalue.c:
Patch from Rob Taylor <rob.taylor@collabora.co.uk> to add a big
missing piece of the glib bindings jigsaw puzzle. This modifies
the existing specialised types to have N type parameters (rather
than the current 1 or 2 for arrays and dictionaries respectively).
You can then use this to get a glib type to represent any arbitrary
D-Bus struct type using dbus_g_type_get_struct. The only
implementation of these types is with GValueArrays as before,
but it's now possible to store these in arrays, emit them in
signals, etc.
John (J5) Palmieri [Mon, 13 Feb 2006 21:01:32 +0000 (21:01 +0000)]
2006-02-13 John (J5) Palmieri <johnp@redhat.com>
* tools/dbus-launch.c: Fixed sh syntax output
John (J5) Palmieri [Fri, 10 Feb 2006 22:36:57 +0000 (22:36 +0000)]
2006-02-10 John (J5) Palmieri <johnp@redhat.com>
* dbus/dbus-signature.c (dbus_signature_iter_recurse): Correctly
deal with nested arrays (Bug #5823) Patch by Thiago Macieira
<thiago.macieira at trolltech.com>
John (J5) Palmieri [Fri, 10 Feb 2006 21:47:10 +0000 (21:47 +0000)]
2006-02-10 John (J5) Palmieri <johnp@redhat.com>
* mono/doc/Makefile.am: Fix parallel make problem with mono-doc
(Bug #4213) Patch from Doug Goldstein <cardoe at gentoo.org>
John (J5) Palmieri [Fri, 10 Feb 2006 21:44:15 +0000 (21:44 +0000)]
2006-02-10 John (J5) Palmieri <johnp@redhat.com>
* bus/connection.c (bus_connections_expect_reply): Make
pending reply limit not common to all connections (Bug #5416)
Patch from Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>
John (J5) Palmieri [Fri, 10 Feb 2006 21:28:52 +0000 (21:28 +0000)]
2006-02-10 John (J5) Palmieri <johnp@redhat.com>
* tools/dbus-launch.c: Fixed csh syntax output (Bug #5720)
John (J5) Palmieri [Fri, 10 Feb 2006 20:57:10 +0000 (20:57 +0000)]
2006-02-10 John (J5) Palmieri <johnp@redhat.com>
* gcj/Makefile.am: point to correct jar command (Bug #4529)
patch from Doug Goldstein <cardoe at gentoo.org>
Joe Shaw [Thu, 9 Feb 2006 19:57:42 +0000 (19:57 +0000)]
2006-02-09 Joe Shaw <joeshaw@novell.com
* mono/Arguments.cs: Fix a magic number in the mono bindings
that doesn't work on 64 bit arches. Patch from Peter Johanson.
Robert McQueen [Fri, 27 Jan 2006 16:40:54 +0000 (16:40 +0000)]
2006-01-27 Robert McQueen <robot101@debian.org>
* glib/dbus-binding-tool-glib.[ch]: Patch based on Ricardo Kekki's
patch to use an annotation org.freedesktop.DBus.GLib.ClientCSymbol
when generating the client-side methods, instead of overloading
CSymbol which broke everything horribly. My apologies.
Robert McQueen [Fri, 27 Jan 2006 15:40:36 +0000 (15:40 +0000)]
2006-01-27 Robert McQueen <robot101@debian.org>
* glib/dbus-gtype-specialized.[ch], glib/dbus-gvalue-utils.c: Patch
by me and Rob Taylor to add a simple_free function to D-Bus map
and collection types, which allows those types which can be freed
with a GDestroyNotify (such as GHashTables and GArrays, but not
GPtrArrays) to be stored as the values in hashtables.
* test/glib/test-dbus-glib.c, test/glib/test-service-glib.{c,xml}:
Patch by Rob Taylor to add nested dicts to the glib tests to check
the above code works, and appears not to leak when called repeatedly.
Robert McQueen [Fri, 27 Jan 2006 15:15:16 +0000 (15:15 +0000)]
2006-01-27 Robert McQueen <robot101@debian.org>
* glib/dbus-gvalue.c (demarshal_valuearray): Patch from Rob Taylor
to free a D-Bus allocated string with dbus_free () instead of
g_free ().
Robert McQueen [Fri, 27 Jan 2006 15:06:55 +0000 (15:06 +0000)]
2006-01-27 Iain Holmes <iain@openedhand.com>
* glib/dbus-gproxy.c (dbus_g_proxy_dispose): Protect the dispose
method from being called multiple times.
Harald Fernengel [Sun, 22 Jan 2006 19:45:14 +0000 (19:45 +0000)]
compile on 64-bit systems
Harald Fernengel [Sun, 22 Jan 2006 19:42:18 +0000 (19:42 +0000)]
convert to QTestLib 4.1
Harald Fernengel [Sun, 22 Jan 2006 19:42:00 +0000 (19:42 +0000)]
allow linking to debug Qt libraries, use QTestLib >= 4.1
Robert McQueen [Thu, 19 Jan 2006 02:54:07 +0000 (02:54 +0000)]
2006-01-19 Robert McQueen <robot101@debian.org>
* glib/dbus-binding-tool-glib.c: Patch from Rob Taylor
<rob.taylor@collabora.co.uk> to add support for generating bindings
to arrays that are represented as GPtrArrays rather than GArrays (ie
size-variable things, such as strings, objects, structs, etc).
Robert McQueen [Thu, 5 Jan 2006 20:22:06 +0000 (20:22 +0000)]
2006-01-05 Robert McQueen <robot101@debian.org>
* dbus/dbus-glib.h, glib/dbus-gproxy.c: Patch from Ricardo Kekki
<ricardo.kekki@movial.fi> to make it possible to inherit from
DBusGProxy, by splitting the DBusGProxy struct into a public part and
a private part, and moving the setting of the DBusGProxyManager into a
connection property, allowing proper GObject construction.
Robert McQueen [Thu, 5 Jan 2006 20:03:38 +0000 (20:03 +0000)]
2006-01-05 Robert McQueen <robot101@debian.org>
* glib/dbus-binding-tool-glib.c: Patch from Ricardo Kekki
<ricardo.kekki@movial.fi> to make dbus-binding-tool heed C symbol name
annotations when generating glib client bindings.
John (J5) Palmieri [Mon, 19 Dec 2005 23:58:22 +0000 (23:58 +0000)]
* dbus/dbus-shared.h: Call it shared constants instead of shared macros
* dbus/dbus-protocol.h: add DOxygen markup to quiet warnings
John (J5) Palmieri [Mon, 19 Dec 2005 23:45:13 +0000 (23:45 +0000)]
- Add doxygen markup to quite warnings
John (J5) Palmieri [Mon, 19 Dec 2005 22:06:24 +0000 (22:06 +0000)]
* dbus/dbus-macros.h: correct DOxygen end of section (s/}@/@})
Ross Burton [Mon, 19 Dec 2005 18:11:05 +0000 (18:11 +0000)]
Add documentation on glib client bindings and annotations
John (J5) Palmieri [Mon, 19 Dec 2005 15:11:51 +0000 (15:11 +0000)]
* dbus/bus.c (dbus_bus_release_name): Add documentation
Robert McQueen [Tue, 6 Dec 2005 12:38:07 +0000 (12:38 +0000)]
2005-12-06 Robert McQueen <robot101@debian.org>
* python/service.py: s/sucessful/successful/ so we're allocating to
and reading from the same variable. Oops.
Havoc Pennington [Thu, 1 Dec 2005 05:42:03 +0000 (05:42 +0000)]
fix file list in update-dbus-docs.sh
John (J5) Palmieri [Thu, 1 Dec 2005 00:07:20 +0000 (00:07 +0000)]
* test/qt/Makefile.am: build from srcdir
* qt/qtconnection.cpp (requestName): Changed PROHIBIT_REPLACE to ALLOW_REPLACE
Note - this code is wrong and needs to be fixed by the Qt binding
developers. The flags should be treated as bitfields and not enums.
* qt/qtconnection.h: Change ProhibitReplace to AllowReplace
* dbus/dbus-list.c (link_after): remove #ifdef DBUS_BUILD_TESTS
John (J5) Palmieri [Wed, 30 Nov 2005 21:23:12 +0000 (21:23 +0000)]
* dbus/dbus-list.c (_dbus_list_insert_after_link, _dbus_list_insert_after):
remove #ifdef DBUS_BUILD_TESTS since we use these methods in production code
John (J5) Palmieri [Wed, 30 Nov 2005 20:30:02 +0000 (20:30 +0000)]
* dbus/dbus-connection.c (dbus_connection_read_write): Add new
method for getting messages off the bus in the absence of a
mainloop. This method is much like
dbus_connection_read_write_dispatch except it does not dispatch
the messages to a registered filter function. Instead it
allows a developer to process messages by directly popping
them off the bus.
John (J5) Palmieri [Wed, 30 Nov 2005 20:14:30 +0000 (20:14 +0000)]
* bus/desktop-file.c (parse_key_value): Ignore locales allowing
the parser to continue instead of returning error
(bus_desktop_file_load): Do not free parser data when
parse_section_start or parse_key_value fails because it was
already freed by parser_free (patch from Carlos Garcia Campos
<carlosgc at gnome.org>)
John (J5) Palmieri [Wed, 30 Nov 2005 19:32:27 +0000 (19:32 +0000)]
* dbus/dbus-auth.c, dbus/dbus-connection.c, dbus/dbus-keyring.c,
dbus/dbus-server-debug-pipe.c, glib/dbus-binding-tool-glib.c
glib/dbus-glib-tool.c, glib/dbus-gparser.c, glib/dbus-gproxy.c
test/test-segfault.c, test/test-utils.c,
test/glib/test-dbus-glib.c, tools/dbus-cleanup-sockets.c
tools/dbus-launch.c, tools/dbus-tree-view.c, tools/dbus-viewer.c:
Various cleanup of dead code and compiler warnings (patch from
Kjartan Maraas <kmaraas at gnome.org>)
John (J5) Palmieri [Wed, 30 Nov 2005 18:48:11 +0000 (18:48 +0000)]
* glib/dbus-gmain.c (connection_setup_add_watch): plugged a leak
(patch from Carlos Garnacho Parro <carlosg at gnome.org>
Robert McQueen [Sun, 27 Nov 2005 17:44:19 +0000 (17:44 +0000)]
2005-11-27 Robert McQueen <robot101@debian.org>
* python/dbus_bindings.pyx: Repair my previous commit which reverted
part of the preceding one. Oops. Merge patch by Johan Hedberg
<johan.hedberg@nokia.com> to fix marshalling of 16-bit integer values
on big-endian platforms.
* test/python/test-client.py: Add some 16-bit integers to the test
values.
Robert McQueen [Sun, 27 Nov 2005 16:55:09 +0000 (16:55 +0000)]
2005-11-27 Carlos Garcia Campos <carlosgc@gnome.org>
* glib/dbus-gobject.c: Append a GValue instead of a basic type in
method return message for property getters
Robert McQueen [Sun, 27 Nov 2005 16:40:57 +0000 (16:40 +0000)]
2005-11-27 Robert McQueen <robot101@debian.org>
* python/dbus_bindings.pyx: Fix a bug where doing a strict append
with type v of an instance of dbus.Variant(foo, type='x') caused
it to be boxed twice before sending over the bus.
* python/dbus_bindings.pyx, python/service.py,
test/python/test-client.py: Update the constants for the new
request_name flags, and update comments/test cases now that queueing
is the default action.
John (J5) Palmieri [Tue, 22 Nov 2005 20:42:49 +0000 (20:42 +0000)]
* configure.in:
- Change version to 0.60 for impending release
- upped the sonames because of ABI and API breakage
John (J5) Palmieri [Tue, 22 Nov 2005 20:37:00 +0000 (20:37 +0000)]
* configure.in: Add test/name-test/Makefile to the generated
Makefile list
* dbus/dbus-shared.h (#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT):
New flag which replaces DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT
(#define DBUS_NAME_FLAG_DO_NOT_QUEUE): New flag for specifying
not to queue an ower if it can't be the primary owner
* bus/bus.h: Add new internal BusOwner struct
* bus/driver.c (bus_driver_handle_hello): Send flags (0 for default)
to bus_registry_ensure and don't set the prohibit_replacement flag
since they are now set per BusOwner and not per name.
(bus_driver_handle_list_queued_owners): bus method (ListQueuedOwners)
that returns the list of connections in a name's connection queue
* bus/services.c (struct BusService): remove prohibit_replacement field
(struct BusOwner): new struct for keeping track of queued connections
and their associated flags for the queue
(struct BusRegistry): add a BusOwner memory pool
(bus_registry_new): initialize the BusOwner memory pool
(bus_registry_unref): free the BusOwner memory pool
(_bus_service_find_owner_link): new internal method for
searching the queue for a specific connection
(bus_owner_set_flags): new method for adding setting the flags on a
bus owner
(bus_owner_new): new method that creates a BusOwner object from the
pool and sets its flags
(bus_owner_ref, bus_owner_unref): ref counting for BusOwner objects
(bus_registry_ensure): Add the flags parameter
(bus_registry_acquire_service): Switch from using raw connections to
using the BusOwner struct
Add new state machine for dealing with the new set of flags
(bus_registry_set_service_context_table, struct OwnershipCancelData,
cancel_ownership, free_ownership_cancel_data,
add_cancel_ownership_to_transaction, struct OwnershipRestoreData,
restore_ownership, free_ownership_restore_data,
add_restore_ownership_to_transaction): Switch to using BusOwner
instead of raw connections
(bus_service_add_owner): Add flags parameter
Switch to using BusOwner instead of raw connections
Add state machine for dealing with the new set of flags
(bus_service_swap_owner): Swaps the first and second owners in the
queue. Used to make sure proper signals are sent when a service looses
or gains primary ownership. We never insert an owner at the top of the
queue. Instead we insert it in the second position and then swap.
(bus_service_remove_owner): Remove the owner from the queue sending
out the NameLost and NameOwnerChanged signals if the we were the
primary owner
(bus_service_get_primary_owners_connection): New method that extracts
the connection from the primary owner
(bus_service_get_primary_owner): Returns the BusOwner instead of the
connection
(bus_service_get_allow_replacement): Changed from the old
bus_service_get_prohibit_replacement method. Checks the flags of the
primary owner and returns if it can be replaced or not
(bus_service_set_prohibit_replacement): removed
(bus_service_has_owner): returns TRUE if and owner with
the specified connection exists in the queue
* dbus/dbus-bus.c (dbus_bus_connection_get_unique_name): New helper
method that only compiles if tests are enabled. Allows us to get the
unique name of a connection so we can check it against the queue when
doing regression tests
* bus/activation.c (bus_activation_send_pending_auto_activate),
bus/dispatch.c (bus_dispatch),
bus/driver.c (bus_driver_handle_get_service_owner,
bus_driver_handle_get_connection_unix_user,
bus_driver_handle_get_connection_unix_process_id,
bus_driver_handle_get_connection_selinux_security_context),
bus/signals.c (connection_is_primary_owner):
use bus_service_get_primary_owners_connection instead of
bus_service_get_primary_owner
* dbus/dbus-sysdeps.c (_dbus_connect_unix_socket,
_dbus_listen_unix_socket): Calculate the length of the socket
path and use that instead of using a fixed length which was
causing socket names to contain many trailing Nul bytes.
* dbus/dbus-glib-lowlevel.h, glib/dbus-gobject.c
(dbus_g_method_get_sender): New method for extracting the sender
from a DBusGMethodInvocation
(dbus_g_method_return_get_reply): changed name to
dbus_g_method_get_reply
(dbus_g_method_return_send_reply): changed name to
dbus_g_method_send reply
* doc/dbus-specification.xml: New docs that describe how the new
queueing system works and talks about the changes to the how
we specify socket names
* glib/examples/example-service.c,
glib/examples/example-signal-emitter.c,
glib/examples/statemachine/statemachine-server.c:
Changed the RequestName flags to the new system
* test/name-test/ (test-names.c, run-test.sh, Makefile.am): New
regression test suite for testing various states of the new
queueing system
Robert McQueen [Tue, 15 Nov 2005 19:34:33 +0000 (19:34 +0000)]
2005-11-15 Robert McQueen <robot101@debian.org>
* dbus/dbus-glib-lowlevel.h, glib/dbus-gobject.c: Patch from Rob
Taylor to add two methods, dbus_g_method_return_get_reply and
dbus_g_method_return_send_reply, to allow you to get the reply
message from a DBusGMethodInvocation, append arbitrary stuff to it,
and send it. The GLib bindings can't marshal a return value of
something like a(s) if the array is empty - ultimately they should be
made to heed the signature of the out arguments as the Python bindings
now can, but this is a workable interim solution which might have
other applications.
Robert McQueen [Tue, 15 Nov 2005 17:19:19 +0000 (17:19 +0000)]
2005-11-15 Robert McQueen <robot101@debian.org>
* bus/driver.c, bus/services.c, bus/services.h: Add a ReleaseName
method to org.freedesktop.DBus to release a bus name or give up
waiting in the queue for it.
* dbus/dbus-bus.c, dbus/dbus-bus.h, dbus/dbus-shared.h: Add a
dbus_bus_release_name method to send the ReleaseName method calls.
Add constants for the return values to dbus/dbus-shared.h.
* doc/dbus-specification.xml: Document the new ReleaseName method
in the specification.
* python/dbus_bindings.pyx: Add a low-level python binding for the
release name method.
* python/exceptions.py, python/service.py: Make freeing BusName
objects release the name. Add a NameExistsException, and fix a
bug with creating UnknownMethodException.
* test/python/test-client.py: Add tests for freeing BusName
objects causing names to be released.
Robert McQueen [Mon, 14 Nov 2005 20:59:32 +0000 (20:59 +0000)]
2005-11-15 Robert McQueen <robot101@debian.org>
* python/service.py: Include the traceback in the error reply when we
send an exception over the bus. _BEST_ _PATCH_ _EVER_
David Zeuthen [Mon, 14 Nov 2005 20:51:25 +0000 (20:51 +0000)]
2005-11-14 David Zeuthen <davidz@redhat.com>
Patch from Timo Hoenig <thoenig@suse.de>.
* bus/bus.c: I've recently investigated why the automatic reload
of configuration files does not work as expected.
Currently, reloading configuration files does only work when
running dbus-daemon with --nodaemon. If we are running as daemon
we're hitting a dnotify bug once we fork the process.
We're initializing the dnotify fds before calling fork(). Once
the child process forked it does still have the fds (and they
still show up in /proc/`pidof dbus-daemon`/fd/) but we're not
getting SIGIO as changes are made to the configuration files.
The attached patch moves the initialization of the dnotify fds to
process_config_postinit(). This is safe for all current code
paths and solves the dnotify disfunction. If we're running
dbus-daemon as daemon the fds for dnotify are now being
initialized after fork() for the child process.
* configure.in: The current configure.in check for dnotify probes
'x$target_os' for being 'xlinux-gnu'. I've changed the check to
match for 'xlinux', too. Additionally I have adapted the configure
option's style to match with the others.
Robert McQueen [Mon, 14 Nov 2005 02:53:30 +0000 (02:53 +0000)]
2005-11-14 Robert McQueen <robot101@debian.org>
* python/decorators.py, python/service.py: Add a new argument to the
dbus.service.method decorator called sender_keyword, which if set,
specifies the name of an argument which will be provided the bus
name of the method caller.
* test/python/test-client.py, test/python/test-service.py: Add a
method and test to check the sender_keyword functionality.
John (J5) Palmieri [Mon, 7 Nov 2005 21:57:13 +0000 (21:57 +0000)]
* bus/driver.c (bus_driver_handle_reload_config): Make sure we send an
empty reply so blocking calls don't block forever (Patch from Sjoerd
Simons <sjoerd at luon.net>)
* AUTHORS: Add Robert McQueen for his work on the Python
Bindings and other parts of D-Bus
Robert McQueen [Mon, 7 Nov 2005 15:31:30 +0000 (15:31 +0000)]
2005-11-07 Robert McQueen <robot101@debian.org>
* python/decorators.py: Change emit_signal function to use the
signature annotation of the signal when marhsalling the arguments from
the service. Fix a bug where the code checking signature length
against argument length referenced the wrong variable.
* python/introspect_parser.py: Avoid adding the type signature of
signal arguments to any methods which occur after them in the
introspection data (!) by making the parser a little more careful
about its current state.
* python/service.py: Remove debug prints from last commit (again :D).
* test/python/test-client.py, test/python/test-service.py: Add test
signals with signature decorators to test the strict marshalling code
gives errors at the right time. Could do with checking the signals
actually get emitted too, given that the test does nothing with
signals at the moment...
Robert McQueen [Mon, 7 Nov 2005 12:14:53 +0000 (12:14 +0000)]
2005-11-07 Robert McQueen <robot101@debian.org>
* python/_dbus.py: Add WeakReferenceDictionary cache of dbus.Bus
instances to stop madness of creating new instances representing
the same bus connection all the time, rendering any tracking of
match rules and bus names quite meaningless. Caught a bug where
the private argument to SessionBus() and friends was being passed
in as use_default_mainloop by mistake. Still some problems with
multiple dbus_binding.Connection instances representing the same
low-level connection (eg when you use both SessionBus() and
StarterBus() in same process), but it's a lot better now than it
was.
* python/dbus_bindings.pyx: Add constants with the return values
for bus_request_name().
* python/service.py: Store bus name instances in a per-dbus.Bus cache
and retrieve the same instances for the same name, so deletion can be
done with refcounting. Also now throws some kind of error if you
don't actually get the name you requested, unlike previously...
* test/python/test-client.py: Add tests for instance caching of buses
and bus name objects.
Robert McQueen [Fri, 4 Nov 2005 12:18:00 +0000 (12:18 +0000)]
2005-11-04 Robert McQueen <robot101@debian.org>
* python/dbus_bindings.pyx, test/python/test-client.py: Fix
marshalling of boolean values. Add some booleans to the values in
the test client.
* python/decorators.py, python/service.py: Add an 'async_callbacks'
argument to the dbus.service.method decorator, which allows you to
name arguments to take two callback functions for replying with
return values or an exception.
* test/python/test-client.py, test/python/test-service.py: Add test
case using asynchronous method reply functions, both return values and
errors, and from within both the function itself and from a mainloop
callback.
* python/decorators.py, python/service.py: Perform checking that the
number of method/signal arguments matches the number of types in the
signature at class loading time, not when you first introspect the
class.
* python/service.py: Remove debug print left by the last commit.
Robert McQueen [Thu, 3 Nov 2005 21:47:31 +0000 (21:47 +0000)]
2005-11-03 Robert McQueen <robot101@debian.org>
* python/service.py: Heavy refactoring of method invocation, with
hopefully no effect on functionality. Nuked _dispatch_dbus_method_call
in favour of a new _message_cb that uses seperate functions for
looking up the method to call, marshalling the return values, and
sending exceptions as errors, and is easier to follow as a
consequence. Fixes some corner cases about returning things that
don't match your declared out_signature, allows exceptions to define
_dbus_error_name and have it be sent over the bus as the error name,
and paves the way for cool stuff like heeding the message no reply
flag, asynchronous method implementations, informing the method of the
sender, and including backtraces in the error messages.
* test/python/test-client.py: Catch and print exceptions thrown in the
async callback tests, rather than passing them to the low-level
bindings to be ignored in a noisy and frustrating manner.
Robert McQueen [Thu, 3 Nov 2005 16:13:53 +0000 (16:13 +0000)]
2005-11-03 Robert McQueen <robot101@debian.org>
* python/_dbus.py, python/proxies.py, python/service.py: Add __repr__
functions to dbus.Bus, dbus.service.BusName and dbus.service.Object,
tweak others to be consistent.
* test/python/test-client.py: Tweak output of testInheritance.
Robert McQueen [Sat, 29 Oct 2005 22:41:07 +0000 (22:41 +0000)]
2005-10-29 Robert McQueen <robot101@debian.org>
* python/service.py: Major changes to allow multiple inheritance
from classes that define D-Bus interfaces:
1. Create a new Interface class which is the parent class of
Object, and make the ObjectType metaclass into InterfaceType.
2. Patch written with Rob Taylor to replace use of method_vtable
with code that walks the class's __MRO__ (method resolution order)
to behave like Python does when invoking methods and allow
overriding as you'd expect. Code is quite tricky because
we have to find two methods, the one to invoke which has the
right name and isn't decorated with the /wrong/ interface,
and the one to pick up the signatures from which is decorated
with the right interface.
The same caveats apply as to normal multiple inheritance -
this has undefined behaviour if you try and inherit from two
classes that define a method with the same name but are
decorated with different interfaces. You should decorate
your overriding method with the interface you want.
3. Replace grungy introspection XML generation code in the metaclass
with dictionaries that cope correctly with multiple inheritance
and the overriding of methods. This also uses the signature
decorations to provide correct introspection data, including
the debut appearance of the types of your return values. :D
* test/python/test-client.py, test/python/test-service.py: Add a test
case to try invoking an method that overrides one inherited from a
D-Bus interface class.
Robert McQueen [Sat, 29 Oct 2005 22:04:01 +0000 (22:04 +0000)]
2005-10-29 Robert McQueen <robot101@debian.org>
* python/dbus_bindings.pyx: Tweak 'raise AssertionError' to assert().
Add checking for the end of struct character when marshalling a
struct in MessageIter.append_strict.
* python/examples/example-service.py,
python/examples/gconf-proxy-service.py,
python/examples/gconf-proxy-service2.py: Update to use gobject
mainloop directly rather than appearing to depend on gtk.
* python/test/test-client.py, python/test/test-server.py: Remove
obsolete and broken test scripts for old bindings. We have up to date
and working tests in test/python/.
Robert McQueen [Sat, 29 Oct 2005 19:13:17 +0000 (19:13 +0000)]
2005-10-29 Robert McQueen <robot101@debian.org>
* python/decorators.py: Add optional arguments to the method and
signal decorators to allow you to specify the signature of arguments
and return values. Preserve the doc strings of signal functions in the
decorated version, for pydoc and friends.
* python/dbus_bindings.pyx, python/proxies.py: Replace the
parse_signature_block function with an iterable dbus.Signature()
type. Fix a bug in MessageIter.append_strict where you could append
anything by claiming it was a string.
* python/service.py: Use the out_signature decoration on methods to
marshal return values, meaning you no longer require dbus.Array()
or dbus.Dictionary() to indicate the type when returning empty
arrays or dictionaries. Fix a bug where exceptions which are defined
in __main__ are not turned into error replies.
* test/python/test-client.py, test/python/test-service.py: Add test
for correct marshalling of return values according to out_signature.
Fix a bug in the async call test where the error_handler is missing a
self argument.
Robert McQueen [Sat, 29 Oct 2005 17:02:58 +0000 (17:02 +0000)]
2005-10-29 Robert McQueen <robot101@debian.org>
* glib/Makefile.am, glib/examples/Makefile.am,
glib/examples/statemachine/Makefile.am: Merge patch from Ubuntu by
Daniel Stone to replace explicit calls to libtool with $(LIBTOOL).
* test/python/.cvsignore: Add run-with-tmp-session-bus.conf.
* tools/dbus-monitor.1, tools/dbus-monitor.c: Merge dbus-monitor patch
from Ubuntu by Daniel Silverstone to allow specifying match rules on
the command line.
Ross Burton [Thu, 27 Oct 2005 16:35:43 +0000 (16:35 +0000)]
Cleanups
Ross Burton [Tue, 25 Oct 2005 15:57:13 +0000 (15:57 +0000)]
Add const keywords
Ross Burton [Tue, 25 Oct 2005 08:54:57 +0000 (08:54 +0000)]
Add a NoReply annotation
Robert McQueen [Mon, 24 Oct 2005 18:29:50 +0000 (18:29 +0000)]
2005-10-24 Robert McQueen <robot101@debian.org>
* python/dbus_bindings.pyx (String, MessageIter): make D-Bus strings
derive from unicode instead of str, and encode/decode UTF-8 when
marshalling/unmarshalling bus messages
* python/introspect_parser.py: encode introspection data as UTF-8
before passing the buffer into libxml2
* test/python/test-client.py: add unicode test strings
* test/data/valid-service-files/.cvsignore, test/python/.cvsignore:
ignore generated python test files
Harald Fernengel [Thu, 20 Oct 2005 14:56:24 +0000 (14:56 +0000)]
applied patch by Timo Hoenig <thoenig at suse de> for better Qt 3 detection
John (J5) Palmieri [Tue, 18 Oct 2005 04:38:05 +0000 (04:38 +0000)]
* glib/dbus-gvalue-utils.c (hash_free_from_gtype): handle gdouble
and G_TYPE_VALUE_ARRAY (DBUS_TYPE_STRUCT)
(gvalue_from_hash_value, hash_value_from_gvalue): handle gdouble
* glib/dbus-gvalue.c (dbus_gvalue_to_signature): add missing
DBUS_STRUCT_BEGIN_CHAR and DBUS_STRUCT_END_CHAR charaters
when constructing struct signatures
* python/_dbus.py (Bus): handle private connections using the
private keyword in the constructor. defaults to private=False
(Bus::close): new method to close a connection to the bus
* python/dbus_bindings.pyx (Connection::close): renamed method
was previously called disconnect
(bus_get): now supports getting a private connection
* python/proxies.py (ProxyMethod::__call__): check if ignore_reply
keyword is set to True. if it is, execute the method without waiting
for a reply
(ProxyObject::_introspect_execute_queue): new method for executing
all the pending methods that were waiting for the introspect to
finish. this is called when introspect either succeeds or fails
(ProxyObject::_introspect_error_handler): call queued methods
John (J5) Palmieri [Fri, 14 Oct 2005 21:44:00 +0000 (21:44 +0000)]
* python/dbus_bindings.pyx (MessageIter::append_strict): check for
STRUCT_BEGIN not TYPE_STRUCT in indicate we are marshalling a struct
* python/service.py (Object::_message_cb): handle exceptions correctly
by sending them over the wire to the calling app. This makes sure
the client returns immediately instead of waiting the 15 seconds to
timeout.
* test/python/test-client.py (TestDBusBindings::testBenchmarkIntrospect):
Add a test to benchmark how long it takes to introspect a service and
call a method which returns a large element (pretty fast)
* test/python/test-service.py (TestObject::GetComplexArray): new test
method which pushes a lot of data
John (J5) Palmieri [Thu, 13 Oct 2005 23:34:12 +0000 (23:34 +0000)]
* python/service.py(ObjectType::_reflect_on_signal, _reflect_on_method):
reclaim memory outside of the loop and use del istead of just setting
the key to None
John (J5) Palmieri [Thu, 13 Oct 2005 23:26:00 +0000 (23:26 +0000)]
* python/service.py (ObjectType::_reflect_on_signal): Always close
signal tag even when there are no arguments
John (J5) Palmieri [Thu, 13 Oct 2005 22:53:54 +0000 (22:53 +0000)]
* (configure.in) Set mono, mono-docs and Qt3 to default
to no instead of auto when building. These bindings do not
have full time maintainers and will not be supported for the
1.0 release.
John (J5) Palmieri [Wed, 12 Oct 2005 22:15:37 +0000 (22:15 +0000)]
patches from Michael Krivoruchko <misha at sun.com>:
* dbus/dbus-connection.c (_dbus_connection_queue_received_message_link,
_dbus_connection_message_sent,
_dbus_connection_send_preallocated_unlocked_no_update,
_dbus_connection_pop_message_link_unlocked): handle the case when path
is NULL when calling _dbus_verbose
* configure.in: check for functions getpeerucred and getpeereid
* dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): provides
support of auth EXTERNAL on Solaris 10+ (getpeerucred), FreeBSD 4.6+,
OpenBSD 3.0+ and FreeBSD 5.0+ as well as MacOSX 10.2+ (getpeereid).
Patch was only tested on Solaris 10 x86 so it might be issues
with other platforms (i.e. BSDs and MacOSX)
John (J5) Palmieri [Thu, 6 Oct 2005 04:43:52 +0000 (04:43 +0000)]
* actualy add the introspection parser to CVS :-)
John (J5) Palmieri [Wed, 5 Oct 2005 20:43:46 +0000 (20:43 +0000)]
* glib/dbus-gvalue.c (marshal_variant): call _dbus_gvalue_marshal
instead of marshal basic so we can handle recursive types in a variant
* test/glib/test-dbus-glib.c: Add test for marshaling recurive types
in variants
* test/glib/test-service-glib.c, test-service-glib.xml
(my_object_echo_variant [EchoVariant],
my_object_process_variant_of_array_of_ints123
[ProcessVariantOfArrayOfInts123]):
Add two test methods
* python/introspect_parser.py: New module for parsing introspect
data.
* python/dbus_bindings.pyx:
(various places): when throwing errors fix to use errormsg instead
of message local variable because Pyrex can get confused with other
message variables (initial patch by Robert McQueen
<robert.mcqueen at collabora.co.uk>)
(MessageIter::parse_signature_block): new method for getting the next
block in a signiture.
(MessageIter::append_strict): new method for appending values strictly
using the passed in signature instead of guessing at the type
(MessageItter:: append_dict, append_struct, append_array): use
signatures to marshal children if the signature is available
* python/exceptions.py (IntrospectionParserException): new exception
* python/proxies.py (ProxyMethod::__call__): Marshal args with
introspected signatures if available, else we fall back to the
old way of doing things.
(ProxyObject::_introspect_reply_handler ): parse introspection data
* python/service.py (ObjectType::_reflect_on_method): Properly
terminate <method> if there are no args in the reflection data
* test/python/test-client.py: add tests for talking with the GLib
test server. This gives us better coverage for introspection since
python to python will always generate arguments as variants. It also
allows us to test the robustness of the GLib bindings and interlanguage
communications.
John (J5) Palmieri [Mon, 3 Oct 2005 19:55:56 +0000 (19:55 +0000)]
* bus/driver.c (bus_driver_handle_introspect): Add signals
to the introspect data. (patch from Daniel P. Berrange
<dan at berrange.com>)
* bus/dispatch.c (check_existent_ping): Add testcase for Ping
* dbus/dbus-connection.c (_dbus_connection_peer_filter,
_dbus_connection_run_builtin_filters): Changed these to
be unlock_no_update functions and call
_dbus_connection_send_unlocked_no_update instead of
dbus_connection_send to avoid locking errors.
* doc/TODO: Removed the make Ping test TODO
Harald Fernengel [Fri, 30 Sep 2005 15:21:44 +0000 (15:21 +0000)]
ignore me
Harald Fernengel [Fri, 30 Sep 2005 15:20:08 +0000 (15:20 +0000)]
bring Qt3 library back. Some apps that are not in the KDE trunk are using it.
Harald Fernengel [Fri, 30 Sep 2005 15:05:33 +0000 (15:05 +0000)]
compile out of the box
Harald Fernengel [Fri, 30 Sep 2005 13:55:55 +0000 (13:55 +0000)]
revert the parts that were accidently comitted. Thanks to Ross Burton for spotting it.
John (J5) Palmieri [Mon, 26 Sep 2005 22:26:38 +0000 (22:26 +0000)]
* glib/dbus-glib-tool.c: removed extra comma at the end of the
DBusBindingOutputMode enum which was causing a warning.
#include <time.h> so using time_t is explicitly defined
John (J5) Palmieri [Mon, 26 Sep 2005 22:12:17 +0000 (22:12 +0000)]
* dbus/Python.pyx: Fixed memory leaks when throwing errors.
We now copy the message from a DBusError and then free
the error object befor throwing the error
John (J5) Palmieri [Mon, 26 Sep 2005 18:49:53 +0000 (18:49 +0000)]
* Integrate patches from Lennart Poettering <mzsqb at 0pointer.de>:
- dbus/dbus-bus.c
(internal_bus_get): new method that take over the heavy lifting
of dbus_bus_get and adds the ability to get a private connection
to the bus
(dbus_bus_get): wrapper to internal_bus_get that provides the same
interface as in previous versions
(dbus_bus_get_private): new method that is a wrapper to
internal_bus_get to get a private connection to the bus
- dbus/dbus-bus.h
(dbus_bus_get_private): add as a public libdbus interface
- dbus-1.pc.in: output system_bus_default_address and
sysconfdir variables so apps can use them when compiling
Harald Fernengel [Fri, 23 Sep 2005 16:24:36 +0000 (16:24 +0000)]
adding an autotest and "dbus-ify" the build process and include scheme
Harald Fernengel [Fri, 23 Sep 2005 14:25:05 +0000 (14:25 +0000)]
new Qt bindings
Harald Fernengel [Fri, 23 Sep 2005 13:28:23 +0000 (13:28 +0000)]
whoops...
Harald Fernengel [Fri, 23 Sep 2005 13:08:26 +0000 (13:08 +0000)]
With the permission of the original authors, removing the non-working and hopelessly unmaintained old Qt D-BUS bindings and adding the ones from KDE's SVN.
Waldo Bastian [Mon, 12 Sep 2005 08:19:33 +0000 (08:19 +0000)]
* dbus/dbus-marshal-validate.c, doc/dbus-specification.xml,
test/Makefile.am, test/test-names.c: allow hyphens in bus names.
Mark McLoughlin [Sun, 11 Sep 2005 10:02:47 +0000 (10:02 +0000)]
2005-09-11 Mark McLoughlin <mark@skynet.ie>
* test/data/auth/fallback.auth-script: we don't
retry the EXTERNAL method when we know its going
to fail anymore.
2005-09-11 Mark McLoughlin <mark@skynet.ie>
* dbus/dbus-connection-internal.h: rename
(add|remove|toggle)_(watch|timeout) to unlocked()
* dbus/dbus-connection.c: ditto.
* dbus/dbus-timeout.c, dbus/dbus-transport-unix.c:
Update some callers for the renaming.
2005-09-10 Mark McLoughlin <mark@skynet.ie>
* dbus/dbus-auth.c: (record_mechanisms): don't
retry the first auth mechanism because we know
we're just going to get rejected again.
* dbus/dbus-keyring.c: (_dbus_keyring_reload):
Fix thinko ... and what a nasty little bugger to
track down you were ...
* dbus/dbus-connection.c:
(_dbus_connection_add_watch),
(_dbus_connection_remove_watch): add note about
these needing the connection to be locked.
(_dbus_connection_get_dispatch_status_unlocked):
set status to DATA_REMAINS when we queue the
disconnected message.
* bus/dispatch.c:
(bus_dispatch): fix warning.
(check_existent_service_no_auto_start):
Expect ChildSignaled error too.
(check_existent_hello_from_self): fix another
couple of warnings.
Joe Shaw [Thu, 8 Sep 2005 18:54:42 +0000 (18:54 +0000)]
2005-09-08 Joe Shaw <joeshaw@novell.com>
Patches from James Willcox <snorp@snorp.net>
* mono/Makefile.am: Add Int16.cs and UInt16.cs
* mono/DBusType/Array.cs: Handle multidimensional arrays, and
support array "out" parameters.
* mono/DBusType/Int16.cs, mono/DBusType/UInt16.cs: New files,
for 16-bit int support.
John (J5) Palmieri [Tue, 6 Sep 2005 22:42:54 +0000 (22:42 +0000)]
- update to next release version
John (J5) Palmieri [Tue, 6 Sep 2005 22:38:54 +0000 (22:38 +0000)]
* Released 0.50
* Patch from Steve Grubb:
- bus/activation.c (bus_activation_service_reload_test): clean up
some indentation
- dbus/dbus-keyring.c (_dbus_keyring_reload): fix conditional
- dbus/dbus-message-factory.c (generate_special): fix a couple of
buffer overflows in the test suite. This is non critical because
it can not be exploited and this code is only run when doing a
make check.
* Patch from Yaakov Selkowitz: Build fixes for Cygwin
- configure.in: Don't check and link against kdecore, only qt headers
- dbus/Makefile.am: Add -no-undefined to libdbus_1_la_LDFLAGS
- gcj/org/freedesktop/dbus/Makefile.am:
add libdbus_gcj_1_la_LDFLAGS = -no-undefined
- glib/Makefile.am: Add -no-undefined to libdbus_glib_1_la_LDFLAGS
and $(DBUS_GLIB_LIBS) to dbus_binding_tool_LDADD
- qt/Makefile.am: Add -no-undefined to libdbus_qt_1_la_LDFLAGS
- tools/Makefile.am: Add platform extentions to binaries
(i.e. .exe on windows)
* configure.in:
- Make it so if no suitable version of python is found we only
disable building python instead of exiting the configure script
- Require version 2.4 of glib for glib bindings
- Up version to 0.50
* python/__init__.py: Sync version with libdbus to (0,50,0)
Olivier Andrieu [Mon, 5 Sep 2005 19:37:19 +0000 (19:37 +0000)]
2005-09-05 Olivier Andrieu <oliv__a@users.sourceforge.net>
* dbus/dbus-object-tree.c (find_subtree_recurse):
a couple of optimizations (bug #710):
- do a binary search in the tree
- insert a new child at the right place directly, no need for
qsort anymore
- do the "double alloc" thing when allocating children
John (J5) Palmieri [Thu, 1 Sep 2005 01:22:06 +0000 (01:22 +0000)]
* python/Makefile.am: Break on pyrexc errors instead of ignoring them
* python/dbus_bindings.pyx: Memory management foo
(global): remove hacky _user_data_references global list
(GIL_safe_cunregister_function_handler): userdata now stuffed into
tuples. Unref user_data
(GIL_safe_cmessage_function_handler): userdata now stuffed into tuples
(Connection::__del__): Remove and replace with __dealloc__ method
(Connection::add_filter): Stuff user_data into a tuple. Use Py_INCREF
to keep tuple from being deallocated instead of the global var hack
(Connection::register_object_path): Stuff user_data into a tuple.
Use Py_INCREF to keep tuple from being deallocated instead of the
global var hack
(Connection::register_fallback): Stuff user_data into a tuple.
Use Py_INCREF to keep tuple from being deallocated instead of the
global var hack
(GIL_safe_pending_call_notification): Don't unref the message
because it gets unreffed when going out of scope. Py_XDECREF
the user_data
(PendingCall::__del__): Remove and replace with __dealloc__ method
(PendingCall::set_notify): ref the pending call because we will
need it to stick around for when the notify callback gets called
(Message::__del__): Remove and replace with __dealloc__ method
* python/dbus_glib_bindings.pyx (init_gthreads): Changed to
gthreads_init to match up with the dbus call
* python/glib.py (init_threads): Changed to threads_init to match
up with gobject.threads_init(). init_threads is kept for backwards
compat but will most likely be deprecated in the future
* test/python/test-client.py:
- revamp to use Python's unittest functionality
- add async call tests
- setup threads in glib and dbus so we make sure locks are working
John (J5) Palmieri [Wed, 31 Aug 2005 02:18:43 +0000 (02:18 +0000)]
* python/dbus_bindings.pyx
(_pending_call_notification, cunregister_function_handler,
cmessage_function_handler): All callback functions have been rearranged
to workaround a bug in Pyrex when working with the GIL which is Python's
global lock when dealing with threads. They have been split into
a wrapper function (which assumes the name of the old function) and
a _GIL_safe_<function name> function which contains the functionality
of the old function. This ensures that Pyrex does not write code
the lock is released.
John (J5) Palmieri [Tue, 30 Aug 2005 15:21:04 +0000 (15:21 +0000)]
* python/dbus_bindings.pyx (_pending_call_notification): Obtain the
GIL global lock when calling back into Python
John (J5) Palmieri [Mon, 29 Aug 2005 20:19:19 +0000 (20:19 +0000)]
* Release 0.36.2
* Add Havoc's patch that never got applied to HEAD (Bug #2436):
* bus/policy.c (bus_policy_allow_user): change default "user is
allowed" to be "user has same uid as the bus itself"; any
allow/deny rules will override.
* bus/session.conf.in: don't allow all users, since now by default
the user that ran the bus can connect.
Harald Fernengel [Fri, 26 Aug 2005 17:34:59 +0000 (17:34 +0000)]
fixed two typos in API docs
Colin Walters [Fri, 26 Aug 2005 15:41:31 +0000 (15:41 +0000)]
2005-08-26 Colin Walters <walters@verbum.org>
* tools/dbus-print-message.c (print_message): Flush stdout
after printing a message, so that redirecting to a file, then
hitting Ctrl-C works.
John (J5) Palmieri [Fri, 26 Aug 2005 04:23:33 +0000 (04:23 +0000)]
* s/Message(_create=0)/EmptyMessage everywhere else
* test/python/test-{server|client}.py: add the python/.libs directory
to the lookup path so dbus_bindings and dbus_glib_bindings don't
get picked up from the system
John (J5) Palmieri [Fri, 26 Aug 2005 03:09:59 +0000 (03:09 +0000)]
* python/dbus_bindings.pyx: Tracked down a major memleak and fixed it
(EmptyMessage): new class that subclasses Message. This is a workaround
to a Pyrex bug that fails to call __del__ when the Message object goes out
of scope. For some reason subclassing Message fixes this bug
(Bus::send_with_reply_and_block): use EmptyMessage instead of Message
Colin Walters [Fri, 26 Aug 2005 02:00:37 +0000 (02:00 +0000)]
2005-08-25 Colin Walters <walters@verbum.org>
* glib/dbus-gproxy.c (dbus_g_proxy_call): Doc update, thanks
to Ryan Lortie for the suggestion.
Havoc Pennington [Thu, 25 Aug 2005 03:15:46 +0000 (03:15 +0000)]
links to some pending tasks
John (J5) Palmieri [Thu, 25 Aug 2005 00:27:35 +0000 (00:27 +0000)]
* forgot to add the service file
John (J5) Palmieri [Thu, 25 Aug 2005 00:20:41 +0000 (00:20 +0000)]
* test/python: Add python regression test
* configure.in: Add test/python/Makefile
* test/Makefile.am: Add the python directory to SUBDIRS
John (J5) Palmieri [Wed, 24 Aug 2005 19:58:32 +0000 (19:58 +0000)]
- Merged changed from the DBUS_0_36_1 bugfix branch
John (J5) Palmieri [Tue, 23 Aug 2005 20:11:39 +0000 (20:11 +0000)]
- Bumped version
John (J5) Palmieri [Tue, 23 Aug 2005 20:07:30 +0000 (20:07 +0000)]
* Release 0.36