John (J5) Palmieri [Tue, 24 May 2005 00:21:07 +0000 (00:21 +0000)]
* python/decorators.py: import dbus_bindings
* python/matchrules.py (SignalMatchRule, SignalMatchTree,
SignalMatchNode): new classes that implement wildcard signal
callback matching using a tree lookup. Heavily modified from a
patch sent by Celso Pinto (fd.o bug #3241)
* _dbus.py (add_signal_receiver, remove_signal_receiver, _signal_func):
use new match classes to handle signals.
John (J5) Palmieri [Thu, 19 May 2005 20:27:19 +0000 (20:27 +0000)]
- s/TYPE_PATH/TYPE_OBJECT_PATH
Havoc Pennington [Wed, 18 May 2005 15:44:50 +0000 (15:44 +0000)]
2005-05-18 Havoc Pennington <hp@redhat.com>
* configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
gettext. Not really worth requiring yet perhaps, but any
production quality 1.0 would require it so we should go ahead and
get things set up. We do have a couple token calls to
bindtextdomain in the code already.
John (J5) Palmieri [Mon, 16 May 2005 21:27:04 +0000 (21:27 +0000)]
* glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
when using recursive g_main_loops
* python/_dbus.py (class Bus): add the ProxyObjectClass
alias for ProxyObject to make it easier for the Twisted
networking framework to integrate dbus.
* python/proxies.py (class ProxyObject): add the ProxyMethodClass
alias for ProxyMethod to make it easier for the Twisted
networking framework to integrate dbus.
Colin Walters [Wed, 11 May 2005 19:02:31 +0000 (19:02 +0000)]
2005-05-11 Ross Burton <ross@burtonini.com>
* glib/dbus-glib-tool.c: Add --prefix argument.
* glib/dbus-binding-tool-glib.h: Add prefix argument.
* glib/dbus-binding-tool-glib.c (compute_marshaller_name):
Add prefix argument.
(generate_glue): Pass prefix argument down.
(dbus_binding_tool_output_glib_server): Pass prefix to
glib-genmarshal.
Colin Walters [Wed, 11 May 2005 18:48:24 +0000 (18:48 +0000)]
2005-05-11 Colin Walters <walters@verbum.org>
* tools/dbus-send.c (append_array): New function.
(append_arg): Broken out from main.
(main): Add cheesy hack to send arrays and variants.
(usage): Update.
* tools/dbus-print-message.c (print_iter): Broken out
from main.
Colin Walters [Wed, 11 May 2005 18:07:22 +0000 (18:07 +0000)]
2005-05-11 Colin Walters <walters@verbum.org>
* dbus/dbus-signature.c (dbus_signature_iter_get_signature):
New function, returns signature string for signature iter.
* dbus/dbus-signature.h: Prototype it.
* dbus/dbus-message.c (dbus_message_iter_get_signature):
New function, returns signature string for message iter.
(dbus_message_iter_get_array_len): New function, returns
length of array.
(dbus_message_iter_get_fixed_array): Fix assertion; this
function should be used when the iter is pointing to the
contents of an array
* dbus/dbus-message.h: Prototypes.
* dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
New function; returns length of an array.
* dbus/dbus-marshal-recursive.h: Prototype it.
Colin Walters [Wed, 11 May 2005 17:59:46 +0000 (17:59 +0000)]
2005-05-11 Colin Walters <walters@verbum.org>
* dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
compilation error.
Havoc Pennington [Sun, 8 May 2005 15:41:39 +0000 (15:41 +0000)]
2005-05-08 Havoc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
daemon's pid, not the parent's pid, to the file descriptor.
Reported by Taj Morton.
Havoc Pennington [Thu, 5 May 2005 22:02:11 +0000 (22:02 +0000)]
2005-05-05 Havoc Pennington <hp@redhat.com>
* configure.in (LT_*): add notes on how the libtool versioning
works to save thinking. Increment soname to indicate protocol
breakage (though really the library interface hasn't changed I
guess)
* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
verify the GUID received from server matches what we were
expecting, if we had an expectation
* dbus/dbus-auth.c (send_ok): send GUID along with the OK command
(_dbus_auth_get_guid_from_server): new function
(send_begin): parse the OK args
* doc/dbus-specification.xml: add GUID to the auth protocol
John (J5) Palmieri [Thu, 5 May 2005 18:27:34 +0000 (18:27 +0000)]
* Fix my name in previous changelog ;)
* python/proxies.py (ProxyObject.__getattr__): add further patch
from Anthony Baxter to throw an AttributeError when python
__special__ functions are called instead of marshling them over
the bus (Bug#1685 comment 3).
John (J5) Palmieri [Thu, 5 May 2005 18:01:45 +0000 (18:01 +0000)]
* python/Makefile.am: changed to use pyexecdir for the binding
shared libraries (Bug#2494)
* python/exceptions.py: bring exceptions over from the bindings
so they can be used in applications (Bug#2036)
Make all exceptions derive from DBusException
* python/_dbus.py, python/proxies.py: implement __repr__ in a couple
of classes so that print obj doesn't throw an exception (Bug #1685)
Colin Walters [Tue, 3 May 2005 17:45:30 +0000 (17:45 +0000)]
2005-05-03 Ross Burton <ross@burtonini.com>
* glib/dbus-gobject.c (dbus_g_connection_register_g_object):
Return if we get an error during registration. Set up a
weak reference on object to unregister if object is destroyed.
(unregister_gobject): New function.
John (J5) Palmieri [Sun, 1 May 2005 19:34:58 +0000 (19:34 +0000)]
* python/dbus_bindings.pyx.in:
- added new type classes for hinting to the marashaler what type
to send over the wire
- added int16 and uint16 marshalers
- Fixed a bug in the type constants that caused int32 to go out
as uint16 over the wire
* python/dbus.py: split up into different files and renamed _dbus.py
* python/__init__.py, python/_util.py, python/decorators.py,
python/exceptions.py, python/proxies.py, python/services.py,
python/types.py: new files split off from dbus.py
* python/Makefile.am: Add new files, remove dbus.py and
install all python files to <python module dir>/dbus
* python/examples/*: Added #!/usr/bin/env python to the top of
every example. Patch provided by Tatavarty Kalyan
John (J5) Palmieri [Tue, 26 Apr 2005 00:56:26 +0000 (00:56 +0000)]
* update configure.in to next version
John (J5) Palmieri [Tue, 26 Apr 2005 00:54:52 +0000 (00:54 +0000)]
* Update to 0.33
John (J5) Palmieri [Mon, 25 Apr 2005 22:54:28 +0000 (22:54 +0000)]
* python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
method for doing async calls
(_pending_call_notification): New C function for handling pendning call
callbacks
(set_notify): New method for setting pending call notification
* python/dbus.py: new version tuple "version" is set at (0, 40, 0)
Async capabilities added to remote method calls
(Sender): class removed
(RemoteService): class removed
(ObjectTree): class removed for now
(RemoteObject): Renamed to ProxyObject
(RemoteMethod): Renamed to ProxyMethod
(method): Decorator added for decorating python methods as dbus methods
(signal): Decorator added for decorating python methods as signal emitters
(ObjectType): Metaclass added for generating introspection data and the
method callback vtable
(Interface): Wrapper class added to wrap objects in a dbus interface
(Object): Uses ObjectType as its metaclass and exports Introspect
of the org.freedesktop.DBus.Introspectable interface
(ValidationException, UnknownMethodException): new exceptions
* python/examples/*: Modified to fit with the new bindings
Havoc Pennington [Sun, 24 Apr 2005 14:04:16 +0000 (14:04 +0000)]
2005-04-23 Havoc Pennington <hp@redhat.com>
* dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
reported by Tony Houghton
* test/test-service.c (main): test
dbus_connection_get_object_path_data()
* dbus/dbus-object-tree.c (find_handler): be sure we always init
the exact_match
(_dbus_object_tree_get_user_data_unlocked): new function used by
dbus_connection_get_object_path_data()
(do_register): add assertion test for get_user_data_unlocked
(object_tree_test_iteration): more tests
* dbus/dbus-connection.c (dbus_connection_get_object_path_data):
new function from Dan Reed to let you get the user data from
dbus_connection_register_object_path()
John (J5) Palmieri [Sat, 23 Apr 2005 22:34:48 +0000 (22:34 +0000)]
* dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
in numerous places that did not account for the NULL terminator
(signature_from_seed): changed the manual string copy loop to
just use strcpy instead
make check should now pass
John (J5) Palmieri [Tue, 19 Apr 2005 13:14:55 +0000 (13:14 +0000)]
* dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
so that it allows messages that are not signals to pass in
NULL as the interface.
David Zeuthen [Tue, 19 Apr 2005 03:35:26 +0000 (03:35 +0000)]
2005-04-18 David Zeuthen <davidz@redhat.com>
* glib/dbus-gmain.c (io_handler_destroy_source):
(timeout_handler_destroy_source, connection_setup_free):
Also unref the source to avoid memory leaks.
David Zeuthen [Thu, 14 Apr 2005 15:10:22 +0000 (15:10 +0000)]
2005-04-13 David Zeuthen <davidz@redhat.com>
* bus/config-parser.c (bus_config_parser_new): Bump this to a
more reasonable, yet still totally arbitrary, value :-).
David Zeuthen [Wed, 13 Apr 2005 16:13:42 +0000 (16:13 +0000)]
2005-04-13 David Zeuthen <davidz@redhat.com>
* doc/TODO: Added an "important for 1.0" item about selinux
allow/deny messages
David Zeuthen [Wed, 13 Apr 2005 14:27:11 +0000 (14:27 +0000)]
2005-04-13 David Zeuthen <davidz@redhat.com>
* bus/selinux.c: Add c-file-style to top of file
(log_audit_callback): Don't free the data here anymore
(bus_selinux_check): Don't take spid and tpid since appending
that to auxdata may OOM.
(bus_selinux_allows_acquire_service): Handle OOM and signal back
to the caller if we are OOM by taking an error object.
(bus_selinux_allows_send): -do-
* bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
and bus_selinux_allows_send
* bus/bus.c (bus_context_check_security_policy): Pass error and
pass on OOM thrown by bus_selinux_allows_send()
* bus/services.c (bus_registry_acquire_service): Pass error and
pass on OOM thrown by bus_selinux_allows_acquire_service()
Havoc Pennington [Wed, 13 Apr 2005 14:10:21 +0000 (14:10 +0000)]
2005-04-13 Havoc Pennington <hp@redhat.com>
* glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
message at a time to avoid monopolizing the main loop, bug
#2953 from Benjamin Otte
Havoc Pennington [Sun, 10 Apr 2005 03:36:46 +0000 (03:36 +0000)]
2005-04-09 Havoc Pennington <hp@redhat.com>
* dbus/dbus-string.c (copy): change a memcpy to memmove due to
possible overlap, fix from Daniel Reed
(fixup_alignment): fix signedness warnings
(_dbus_string_append_unichar): ditto
Havoc Pennington [Sat, 9 Apr 2005 23:50:58 +0000 (23:50 +0000)]
2005-04-09 Havoc Pennington <hp@redhat.com>
* dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
* glib/dbus-glib-tool.c (main): fix warning
* glib/dbus-binding-tool-glib.c (generate_glue): fix warning
* dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
add a new function that can be used in simple applications that
don't have a main loop and are willing to block
David Zeuthen [Wed, 6 Apr 2005 17:36:47 +0000 (17:36 +0000)]
2005-04-05 David Zeuthen <davidz@redhat.com>
Fix https://bugs.freedesktop.org/show_bug.cgi?id=2889
* glib/dbus-gmain.c:
(io_handler_destroy_source): Remove from list of IO handlers
of the ConnectionSetup object
(timeout_handler_destroy_source): -do- for timeout handlers
(io_handler_source_finalized): Don't remove from list since
we now do that in io_handler_destroy_source(). Renamed from
io_handler_source_destroyed
(timeout_handler_source_destroyed): -do- for timeout handlers
(connection_setup_free): It is now safe to iterate over all
IO and timeout handlers as the _destroy_source removes them
from the list synchronously
Havoc Pennington [Thu, 31 Mar 2005 02:24:12 +0000 (02:24 +0000)]
2005-03-30 Havoc Pennington <hp@redhat.com>
* configure.in: change check to gtk 2.4
* tools/dbus-viewer.c (name_combo_changed_callback): remove
gtk_combo_box_get_active_text() usage to decrement GTK requirement
to 2.4
John (J5) Palmieri [Tue, 29 Mar 2005 18:33:27 +0000 (18:33 +0000)]
- bump to next release
John (J5) Palmieri [Tue, 29 Mar 2005 18:27:35 +0000 (18:27 +0000)]
* News: Update 0.32
* HACKING: Fixed realease instructions. configure.in should be updated to
the next release by the person who made the last release.
John (J5) Palmieri [Tue, 29 Mar 2005 17:01:43 +0000 (17:01 +0000)]
* python/lvalue_cast_post_process.py - removed. Patch has been
submitted to Pyrex maintainers that fixes gcc4.0 error
* python/Makefile.am: removed refrences to lvalue_cast_post_process.py
Colin Walters [Thu, 24 Mar 2005 15:44:43 +0000 (15:44 +0000)]
2005-03-24 Daniel Reed <n@ml.org>
* tools/Makefile.am: Make print-introspect and
dbus-bus-introspect.xml building conditional on HAVE_GLIB.
Havoc Pennington [Thu, 24 Mar 2005 14:23:08 +0000 (14:23 +0000)]
add colin to patch approver list (the list is really wonky/out-of-date in more ways than this)
John (J5) Palmieri [Tue, 22 Mar 2005 17:57:27 +0000 (17:57 +0000)]
* tools/Makefile.am: Patch by Colin Walters that fixes distcheck
* dbus/dbus-userdb.c, dbus/dbus-userdb-util.c: Add patch we have
had in Red Hat packages for a while but for some reason never
got merged upstream
(_dbus_is_a_number): New checks if a string
can be converted to a number and does the conversion if it can
(_dbus_user_database_lookup): Add check to see if the given username
is a udi. This allows udi's to be used instead of usernames in the
config file.
(_dbus_user_database_lookup_group): Add check to see if the given groupname
is a gdi. This allows gdi's to be used instead of groupnames in the
config file.
John (J5) Palmieri [Mon, 21 Mar 2005 21:13:56 +0000 (21:13 +0000)]
* python/lvalue_cast_post_process.py - added post processor to fix Pyrex
code so that it compiles with gcc4.0
* python/Makefile.am: Added lvalue_cast_post_process.py to EXTRA_DIST
run dbus_bindings.c through lvalue_cast_post_process.py and copy the
results back to dbus_binding.c
Colin Walters [Mon, 21 Mar 2005 03:03:57 +0000 (03:03 +0000)]
2005-03-20 Colin Walters <walters@verbum.org>
Patch suggested by Inguva Rajasekhar <ringuva@novell.com>.
* configure.in: Require GTK+ 2.6.
Colin Walters [Mon, 21 Mar 2005 02:31:09 +0000 (02:31 +0000)]
2005-03-20 Colin Walters <walters@verbum.org>
* Makefile.am (SUBDIRS, DIST_SUBDIRS): Build tools before test.
Colin Walters [Thu, 17 Mar 2005 23:13:38 +0000 (23:13 +0000)]
2005-03-17 Tom Parker <palfrey@tevp.net>
* dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
print DBUS_UID_UNSET; instead print passed username. Also
be sure to actually use gid looked up in cache.
* dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
for DBUS_GID_UNSET and groupname.
Colin Walters [Thu, 17 Mar 2005 23:10:44 +0000 (23:10 +0000)]
2005-03-17 Tom Parker <palfrey@tevp.net>
* dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
print DBUS_UID_UNSET; instead print passed username.
* dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
for DBUS_GID_UNSET and groupname.
Colin Walters [Thu, 17 Mar 2005 17:53:31 +0000 (17:53 +0000)]
*** empty log message ***
Colin Walters [Thu, 17 Mar 2005 17:48:29 +0000 (17:48 +0000)]
2005-03-17 Colin Walters <walters@verbum.org>
* bus/print-introspect.c: Move to tools/.
* bus/run-with-tmp-session-bus.sh: Ditto.
* glib/Makefile.am (dbus-glib-bindings.h): Move
generation to tools/Makefile.am.
* test/glib/run-test.sh: Update to handle move
of run-with-tmp-session-bus.sh.
* test/glib/test-service-glib.c: Update to handle
move of dbus-glib-bindings.h.
* tools/print-introspect.c: Moved here
from bus/, and ported to GLib bindings.
* tools/run-with-tmp-session-bus.sh: Moved here
from bus/.
* tools/Makefile.am: Generate dbus-glib-bindings.h
and dbus-bus-introspect.xml here.
* tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
Update.
Colin Walters [Thu, 17 Mar 2005 17:11:59 +0000 (17:11 +0000)]
2005-03-14 Colin Walters <walters@verbum.org>
* bus/driver.c (write_args_for_direction): Use
_dbus_string_get_const_data to retrieve string;
_dbus_string_get_const_data_len doesn't actually return
a NULL-terminated substring.
* test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
(main): Change to use org_freedesktop_DBus_request_name
instead of using g_proxy_begin_call/end_call.
Joe Shaw [Tue, 15 Mar 2005 23:30:55 +0000 (23:30 +0000)]
2005-03-15 Joe Shaw <joeshaw@novell.com>
* mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
generating the finalizer. Fixes from Ben Maurer.
Joe Shaw [Sun, 13 Mar 2005 05:07:35 +0000 (05:07 +0000)]
2005-03-13 Joe Shaw <joeshaw@novell.com>
* mono/ProxyBuilder.cs (BuildConstructor): Decalre a local
variable for storing our callback in. Update the allocation
comments.
Joe Shaw [Sun, 13 Mar 2005 02:15:09 +0000 (02:15 +0000)]
2005-03-12 Joe Shaw <joeshaw@novell.com>
* mono/BusDriver.cs: Update method names: ListServices
becomes ListNames; GetOwner becomes GetNameOwner.
Joe Shaw [Sun, 13 Mar 2005 02:05:56 +0000 (02:05 +0000)]
2005-03-12 Joe Shaw <joeshaw@novell.com>
* mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
onto the eval stack when removing the delegate.
Joe Shaw [Sun, 13 Mar 2005 01:56:29 +0000 (01:56 +0000)]
2005-03-12 Joe Shaw <joeshaw@novell.com>
* mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
LT_CURRENT. Set it to the autoconf variable.
Joe Shaw [Sun, 13 Mar 2005 01:13:22 +0000 (01:13 +0000)]
2005-03-12 Joe Shaw <joeshaw@novell.com>
* mono/ProxyBuilder.cs: Add a finalizer to the generated proxy
classes that disconnects the signal handler delegate from the
service object. Fixes a big leak of proxy objects on the
client side of things. Patch from Ben Maurer
<bmaurer@ximian.com>
Joe Shaw [Sun, 13 Mar 2005 01:13:04 +0000 (01:13 +0000)]
*** empty log message ***
Colin Walters [Sat, 12 Mar 2005 20:07:21 +0000 (20:07 +0000)]
2005-03-12 Colin Walters <walters@verbum.org>
* bus/driver.c (write_args_for_direction): New function,
parses a type signature into arguments and outputs to
XML.
(bus_driver_handle_introspect): Use it instead of
hardcoding XML for certain signatures.
* bus/Makefile.am (dbus-bus-introspect.xml): Add
dependency on dbus-daemon.
* glib/dbus-glib-tool.c (main): Parse ignore_unsupported
argument, pass it to dbus_binding_tool_output_glib_client.
* glib/dbus-binding-tool-glib.c
(generate_client_glue): Protect against multiple inclusion.
(dbus_binding_tool_output_glib_client): Add
G_BEGIN_DECLS/G_END_DECLS.
* glib/dbus-binding-tool-glib.c (compute_client_method_name):
Change to just take iface prefix directly.
(write_formal_parameters): Clarify error message.
(check_supported_parameters): New function; checks to see type
signatures of method parameters are supported.
(generate_client_glue): Handle ignore_unsupported flag.
(dbus_binding_tool_output_glib_client): Handle ignore_unsupported
parameter.
* glib/Makefile.am (dbus-glib-bindings.h): Pass
--ignore-unsupported by default until glib bindings
support arrays.
Colin Walters [Sat, 12 Mar 2005 16:33:01 +0000 (16:33 +0000)]
2005-03-11 Colin Walters <walters@verbum.org>
* glib/Makefile.am: Generate dbus-glib-bindings.h and
install it.
* bus/print-introspect.c: New file; prints introspection
data for a given name and object path.
* bus/run-with-tmp-session-bus.sh: New file, refactored
from test/glib/run-test.sh. Creates a temporary session
bus and runs another program.
* test/glib/run-test.sh: Refactor to invoke
run-with-tmp-session-bus.sh.
* bus/driver.c (bus_driver_handle_introspect): Fix to print new
introspection format. Also change to use DBUS_TYPE_x_AS_STRING
macros instead of hardcoding.
* glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
Joe Shaw [Fri, 11 Mar 2005 17:43:22 +0000 (17:43 +0000)]
2005-03-11 Joe Shaw <joeshaw@novell.com>
* dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
this unref; it doesn't match up evenly in some codepaths.
(_dbus_connection_block_pending_call): Unref at every exitpoint;
this evenly matches with the ref near the top of this function.
Joe Shaw [Wed, 9 Mar 2005 17:30:38 +0000 (17:30 +0000)]
2005-03-09 Joe Shaw <joeshaw@novell.com>
* dbus/dbus-object-tree.c
(_dbus_object_tree_unregister_and_unlock): If checks are enabled
and we try to unregister a path that's not registered, still go
through the process of unlocking and don't just return.
Colin Walters [Wed, 9 Mar 2005 17:09:11 +0000 (17:09 +0000)]
2005-03-09 Colin Walters <walters@verbum.org>
* glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
to this are generated for client-side wrappers. Invokes a
D-BUS method and returns reply values.
* glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
function; writes signature string for argument direction.
(write_args_for_direction): Change to pass input values directly
instead of via address, and fix indentation.
(generate_client_glue): Change to invoke dbus_g_proxy_invoke. Also
make generated wrappers inlineable.
* dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
note about using dbus_type_is_fixed.
* dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
dbus/dbus-signature.c as dbus_type_is_fixed.
All callers updated.
* dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
* dbus/dbus-signature.h: Prototype.
* glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
error printf code.
* test/glib/test-dbus-glib.c (main): Be sure to clear error as
appropriate instead of just freeing it.
(main): Free returned strings using g_free.
* test/glib/Makefile.am (test-service-glib-glue.h)
(test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
* glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
simply maps a simple D-BUS type to GType.
(dbus_dbus_type_to_gtype): Function which maps D-BUS type to
GType.
(dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
initialize the value with it.
(dbus_gvalue_binding_type_from_type): Unused, delete.
(dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
various types instead of unmarshalling to value data directly.
Remove can_convert boolean.
(dbus_gvalue_marshal): Remove duplicate initialization; switch to
returning directly instead of using can_convert boolean.
(dbus_gvalue_store): New function; not related to D-BUS per-se.
Stores a GValue in a pointer to a value of its corresponding C
type.
* glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
add dbus_gvalue_store.
Joe Shaw [Wed, 9 Mar 2005 04:36:15 +0000 (04:36 +0000)]
2005-03-08 Joe Shaw <joeshaw@novell.com>
Fix a bunch of lifecycle and memory management problems
in the mono bindings.
* mono/Arguments.cs (Arguments): Implement IDisposable
* mono/Bus.cs (Bus): Don't allow public instantiation. This is
strictly a static class.
* mono/Connection.cs: Move the DBusObjectPathVTable and associated
delegates into this file.
(Connection): Implement IDisposable.
(Dispose): Disconnect the connection and set the raw connection
pointer to IntPtr.Zero.
(~Connection): Call Dispose().
(RegisterObjectPath): Added. Manages the registration of object
paths so we can cleanly disconnect them at dispose/finalize time.
(UnregisterObjectPath): Ditto.
(set_RawConnection): Unregister all of the object paths when
changing the underlying DBusConnection. Add them back onto the
new connection, if any.
* mono/Handler.cs: Don't implement IDisposable; it doesn't use any
more unmanaged resources anymore, so it's not necessary. Move all
the DBusObjectPathVTable stuff out of here.
(Handler): Save references to our delegates so that they don't get
finalized. Call Connection.RegisterObjectPath() instead of
dbus_connection_register_object_path() directly.
(Message_Called): Dispose the message after we're finished with
it.
* mono/Message.cs (Message): Implement IDisposable.
(Dispose): Dispose the Arguments, and set the RawMessage to
IntPtr.Zero.
(SendWithReplyAndBlock): We own the ref to the reply that comes
back from dbus_connection_send_with_reply_and_block() so add a
comment about that and unref it after we've constructed a managed
MethodReturn class around it. Fixes a big, big leak.
* mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
method.
(BuildSignalHandler): After we've sent the Signal message, dispose
of it.
(BuildMethod): Dispose of the method call and reply messages after
we've sent the message and extracted the data we want from the
reply.
* mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
anymore.
(Service_FilterCalled): Dispose of the message after we're
finished with it.
Joe Shaw [Tue, 8 Mar 2005 20:45:03 +0000 (20:45 +0000)]
2005-03-08 Joe Shaw <joeshaw@novell.com>
* dbus/dbus-connection.c (dbus_connection_send_with_reply):
After we attach our pending call to the connection, unref
it. Fixes a leak.
* mono/Connection.cs (set_RawConnection): Disconnect our
filter and match callbacks from the old connection and
reconnect them to the new connection, if any.
* mono/DBusType/Array.cs: "Code" is a static member, so
don't use "this" to refer to it. Fix for stricter checking
in Mono 1.1.4.
* mono/DBusType/ObjectPath.cs (Append): Don't leak the
object path that we pass into unmanaged code.
* mono/DBusType/String.cs (Append): Don't leak the string
that we pass into unmanged code.
John (J5) Palmieri [Mon, 7 Mar 2005 21:19:47 +0000 (21:19 +0000)]
* Bump version number after makeing a release
John (J5) Palmieri [Mon, 7 Mar 2005 21:10:46 +0000 (21:10 +0000)]
* NEWS: Update for 0.31
* configure.in: Release 0.31
add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
* qt/Makefile.am: fixed build
* dbus/Makefile.am: soname bump for libdbus
* glib/Makefile.am: soname bump for libdbus-glib
Havoc Pennington [Sat, 5 Mar 2005 18:38:54 +0000 (18:38 +0000)]
2005-03-05 Havoc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps.c:
(pseudorandom_generate_random_bytes_buffer): fix to have no return
value
(_dbus_generate_random_bytes_buffer): fix return value
* dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
checks actually work, from Tom Parker <fdo@tevp.net>
Colin Walters [Wed, 2 Mar 2005 04:15:43 +0000 (04:15 +0000)]
2005-03-01 Colin Walters <walters@verbum.org>
* test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
functions copied from dbus-glib-tool.c.
(main): Convert lots of error code to use them.
Also add some testing for introspection bits.
Colin Walters [Tue, 1 Mar 2005 15:20:05 +0000 (15:20 +0000)]
2005-03-01 Colin Walters <walters@verbum.org>
* doc/TODO: Remove introspection signature TODO.
Colin Walters [Sun, 27 Feb 2005 17:38:12 +0000 (17:38 +0000)]
2005-02-27 Colin Walters <walters@verbum.org>
* glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
Change return value to const char * instead of int so we can do
full signatures.
(struct PropertyInfo, struct ArgInfo): Store char *.
(property_info_new, arg_info_new): Update parameters, strdup.
(property_info_unref, arg_info_unref): Free.
* glib/dbus-gidl.h: Update prototypes.
* glib/dbus-gparser.c (basic_type_from_string): Delete.
(validate_signature): New function, just validates signature and
sets GError.
(parse_property, parse_arg): Invoke validate_signature. Store
signature instead of just type code.
* glib/dbus-gvalue.c (base_type_from_signature): New utility
function to return a primary type for a signature, dropping
information about types in container types.
(dbus_gvalue_genmarshal_name_from_type)
(dbus_gvalue_binding_type_from_type)
(dbus_gvalue_ctype_from_type): Update to take full signature
instead of type code.
(dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
* glib/dbus-gvalue.h: Update prototypes for above.
* glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
(introspect_properties, introspect_signals, write_interface):
Update to handle signatures, and remove usage of
_dbus_gutils_type_to_string.
(handle_introspect): Print out type codes instead of e.g. "string"
in hardcoded introspection XML; also use x_AS_STRING constants
instead of hardcoding in string.
* glib/dbus-glib-tool.c (pretty_print): Handle signature change
to string. Remove usage of _dbus_gutils_type_to_string.
* glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
* glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
deletion.
* glib/dbus-binding-tool-glib.c (compute_marshaller)
(compute_marshaller_name, generate_glue): Handle signature change
to string.
(write_formal_parameters, write_args_for_direction): Ditto, and
remove FIXME.
* tools/dbus-tree-view.c (type_to_string): Delete.
(info_set_func_text): Update to print full signatures.
* test/glib/test-service-glib.xml: Change types to new
introspection format.
Havoc Pennington [Sat, 26 Feb 2005 06:37:46 +0000 (06:37 +0000)]
2005-02-26 Havoc Pennington <hp@redhat.com>
* doc/TODO: remove the "guid" item
* test/glib/test-profile.c (no_bus_thread_func): use open_private
(with_bus_thread_func): use open_private
* dbus/dbus-connection.c (dbus_connection_open_private): new
function that works like the old dbus_connection_open()
(dbus_connection_open): now returns an existing connection if
possible
* dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
through the GUID to the transport
* dbus/dbus-server.c (_dbus_server_init_base): keep around the
GUID in hex-encoded form.
* dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
pass GUID argument in to the transport
* dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
guid argument
* dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
* dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
Havoc Pennington [Fri, 25 Feb 2005 22:03:30 +0000 (22:03 +0000)]
2005-02-25 Havoc Pennington <hp@redhat.com>
* doc/dbus-specification.xml: document the GUID thing
* dbus/dbus-server.c (_dbus_server_init_base): initialize a
globally unique ID for the server, and put a "guid=hexencoded"
field in the address
* dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
* dbus/dbus-message.c: ditto
* dbus/dbus-dataslot.c: ditto
* dbus/dbus-list.c: ditto
* dbus/dbus-internals.h: wait, just include
dbus-threads-internal.h here
* dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
use in main library
* dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
Colin Walters [Thu, 24 Feb 2005 22:57:40 +0000 (22:57 +0000)]
2005-02-24 Colin Walters <walters@verbum.org>
* test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
John (J5) Palmieri [Thu, 24 Feb 2005 22:01:34 +0000 (22:01 +0000)]
glib/Makefile.am: added dbus-gobject.h to sources list
so distcheck doesn't fail
Havoc Pennington [Thu, 24 Feb 2005 19:13:37 +0000 (19:13 +0000)]
remove the todo item I just did
Havoc Pennington [Thu, 24 Feb 2005 19:00:57 +0000 (19:00 +0000)]
doh
Havoc Pennington [Thu, 24 Feb 2005 18:37:16 +0000 (18:37 +0000)]
2005-02-24 Havoc Pennington <hp@redhat.com>
* dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
you must disconnect before unref, since locking and other things
are screwed up otherwise. Fix assorted other locking stuff.
* dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
fix compilation
* dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
into a private header and don't export from the library
* throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
Colin Walters [Thu, 24 Feb 2005 16:03:56 +0000 (16:03 +0000)]
2005-02-24 Colin Walters <walters@verbum.org>
* dbus/dbus-signature.c: New file; implements various functions
related to type signatures. Includes an interator for parsing,
validation functions.
(dbus_type_is_basic): Moved here from
dbus-marshal-basic.c:_dbus_type_is_basic.
(dbus_type_is_container): Moved here from
dbus-marshal-basic.c:_dbus_type_is_container.
All callers of _dbus_type_is_container and _dbus_type_is_basic
updated, and include dbus-signature.h.
* dbus/dbus-signature.h: New file; prototypes for the above.
* dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
dbus-signature.h.
* dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
function factored out of _dbus_first_type_in_signature.
(_dbus_first_type_in_signature_c_str): New function; returns first
type code for a type signature character.
* dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
handle function moves.
* dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
* dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
function; skips to next complete type in type signature.
Implemented using previous skip_one_complete_type. Now
skip_one_complete_type just delegates to
_dbus_type_signature_next.
* dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
to dbus-signature.c
(_dbus_type_is_container): Ditto.
* doc/dbus-specification.xml: Update introspection sample to
use real type signatures.
* dbus/dbus-test.h: Prototype signature test.
* dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
signature tests.
* dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
John (J5) Palmieri [Wed, 23 Feb 2005 19:36:24 +0000 (19:36 +0000)]
python/dbus_bindings.pyx.in (PendingCall::get_reply):
s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
Colin Walters [Mon, 21 Feb 2005 19:38:06 +0000 (19:38 +0000)]
2005-02-21 Colin Walters <walters@verbum.org>
* dbus/dbus-test-main.c (main): Take optional specific test
argument.
* dbus/dbus-test.c (run_test): New function, runs a test function
with no data directory.
(run_data_test): Like above, but takes data directory.
(dbus_internal_do_not_use_run_tests): Take
specific test argument. Replace lots of cut n' paste code
with run_test and run_data_test.
* dbus/dbus-test.h: Update prototype for
dbus_internal_do_not_use_run_tests.
Havoc Pennington [Mon, 21 Feb 2005 04:09:40 +0000 (04:09 +0000)]
2005-02-20 Havoc Pennington <hp@redhat.com>
Fix bugs reported by Daniel P. Berrange
* dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
(protected_change_watch): new function
(_dbus_server_toggle_watch, _dbus_server_remove_watch)
(_dbus_server_add_watch): change to work like the
dbus-connection.c equivalents; like those, probably kind of
busted, but should at least mostly work for now
(dbus_server_disconnect): drop the lock if we were already
disconnected, patch from Daniel P. Berrange
* dbus/dbus-server.c (_dbus_server_toggle_timeout)
(_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
same stuff
* doc/TODO: todo about unscrewing this mess
Colin Walters [Sat, 19 Feb 2005 23:25:41 +0000 (23:25 +0000)]
2005-02-19 Colin Walters <walters@verbum.org>
* glib/dbus-binding-tool-glib.c
(dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
* glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
as errno.h and sys/stat.h.
(lose): New function, prints error with
newline and exits.
(lose_gerror): Similar, but takes GError for message.
(main): Add --output argument to specify output file to write to,
instead of always printing to stdout. In this mode, determine
timestamps on source files to see whether any are newer than the
target file. If not, exit. Also convert a number of error
messages to use lose (since it's shorter), and switch to using
g_io_channel_shutdown.
Havoc Pennington [Sat, 19 Feb 2005 16:59:03 +0000 (16:59 +0000)]
add TODO about global shared connections
Havoc Pennington [Sat, 19 Feb 2005 16:17:29 +0000 (16:17 +0000)]
2005-02-19 Havoc Pennington <hp@redhat.com>
* glib/dbus-gobject.c
(_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
* glib/dbus-glib.c: fix doxygen warnings
* glib/dbus-gparser.c (parse_annotation): error if an annotation
is found on an <arg>
Colin Walters [Fri, 18 Feb 2005 03:14:33 +0000 (03:14 +0000)]
2005-02-17 Colin Walters <walters@verbum.org>
* glib/dbus-gobject.h: Don't export
_dbus_glib_marshal_dbus_message_to_gvalue_array.
* glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
(invoke_object_method): Handle it.
* glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
Handle rename.
Colin Walters [Thu, 17 Feb 2005 21:30:42 +0000 (21:30 +0000)]
*** empty log message ***
Colin Walters [Thu, 17 Feb 2005 21:25:49 +0000 (21:25 +0000)]
2005-02-17 Colin Walters <walters@verbum.org>
* bus/.cvsignore, doc/.cvsignore
* test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
Update.
Colin Walters [Thu, 17 Feb 2005 21:19:49 +0000 (21:19 +0000)]
2005-02-17 Colin Walters <walters@verbum.org>
* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
Rename to DBUS_SERVICE_DBUS.
(DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
(DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
(DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
(DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
DBUS_INTERFACE_INTROSPECTABLE.
(DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
DBUS_INTERFACE_PROPERTIES.
(DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
DBUS_INTERFACE_PEER.
(DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
DBUS_INTERFACE_LOCAL.
All other users of those constants have been changed.
* bus/driver.c (bus_driver_handle_introspect): Use constants.
* glib/dbus-gobject.c (handle_introspect): Use constants.
* doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
Colin Walters [Thu, 17 Feb 2005 21:11:18 +0000 (21:11 +0000)]
2005-02-17 Colin Walters <walters@verbum.org>
* glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
(parse_node, parse_interface, parse_method, parse_signal)
(parse_property, parse_annotation): Lose if we're currently in an
annotation.
(parse_annotation): New function.
(parser_start_element, parser_end_element): Handle annotation.
(parse_method, parse_interface): Remove support for c_name attribute,
switch to annotations.
* glib/dbus-gidl.h (interface_info_get_binding_names)
(method_info_get_binding_names)
(interface_info_get_binding_name, method_info_get_binding_name)
(interface_info_set_binding_name, method_info_set_binding_name):
Remove.
(interface_info_get_annotations, method_info_get_annotations)
(interface_info_get_annotation, method_info_get_annotation)
(interface_info_add_annotation, method_info_add_annotation):
Prototype.
* glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
for "bindings".
(struct MethodInfo): Ditto.
Straightfoward conversion of binding methods into annotation methods
as prototyped.
* glib/dbus-glib-tool.c (pretty_print): Print annotations.
* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
* glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
Use new annotation API.
* doc/introspect.dtd: Fix a number of DTD syntax errors. Add
annotation element.
* doc/dbus-specification.xml: Discuss introspection annotations,
include list of well-known annotations.
* test/glib/test-service-glib.xml: Make validate against new DTD.
Colin Walters [Thu, 17 Feb 2005 17:41:30 +0000 (17:41 +0000)]
2005-02-17 Colin Walters <walters@verbum.org>
This patch is based on initial work from
Paul Kuliniewicz <kuliniew@purdue.edu>.
* glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
initialization of GValue from dbus type to here.
(dbus_gvalue_genmarshal_name_from_type): New function; generates a string
for the "glib-genmarshal" program from a DBus type.
(dbus_gvalue_binding_type_from_type): New function; turns a DBus type
into the C name for it we use in the glib bindings.
(dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
glib C type (not GValue).
(dbus_gvalue_demarshal): invoke dbus_gvalue_init.
* glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
from dbus-gobject.c.
* glib/dbus-gutils.h: Prototype it.
* glib/dbus-gproxy.c: Include new dbus-gobject.h.
(marshal_dbus_message_to_g_marshaller): Use new shared function
dbus_glib_marshal_dbus_message_to_gvalue_array.
* glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
Will be changed once we have annotations.
* glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
GStaticRWLock. Callers updated.
(wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
(string_table_next): New function for iterating over zero-terminated
string value array.
(string_table_lookup): New function; retrieves specific entry in
array.
(get_method_data): New function; look up method data in object data chunk.
(object_error_domain_prefix_from_object_info)
(object_error_code_from_object_info): New functions, but not implemented yet.
(method_interface_from_object_info): New function; retrieve interface name.
(method_name_from_object_info): New function; retrieve method name.
(method_arg_info_from_object_info): New function; retrieve argument data.
(arg_iterate): New function; iterates over serialized argument data.
(method_dir_signature_from_object_info): New function; returns a
GString holding type signature for arguments for just one
direction (input or output).
(method_input_signature_from_object_info)
(method_output_signature_from_object_info): New functions.
(dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
converts dbus message arguments into a GValue array. Used for both
signal handling and method invocation.
(struct DBusGlibWriteIterfaceData): New utility structure.
(write_interface): New function; generate introspection XML for
an interface.
(introspect_interfaces): New function; gathers all interface->methods,
generates introspection XML for them.
(handle_introspect): Invoke introspect_interfaces.
(get_object_property): Be sure to zero-initalize stack-allocated GValue.
(lookup_object_and_method): New function; examines an incoming message
and attempts to match it up (via interface, method name, and argument
signature) with a known object and method.
(gerror_domaincode_to_dbus_error_name): New function; converts a
GError domain and code into a DBus error name. Needs GError data
added to object introspection to work well.
(gerror_to_dbus_error_message): Creates a DBusMessage error return from
GError.
(invoke_object_method): New function to invoke an object method
looked up via lookup_object_and_method. Parses the incoming
message, turns it into a GValue array, then invokes the marshaller
specified in the DBusGMethodInfo. Creates a new message with
either return values or error message as appropriate.
(gobject_message_function): Invoke lookup_object_and_method and
invoke_object_method.
* glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
(enum DBusBindingOutputMode): New enum for binding output modes.
(pretty_print): Print binding names.
(dbus_binding_tool_error_quark): GError bits.
(version): Fix typo.
(main): Create GIOChannel for output. Parse new --mode argument,
possible values are "pretty-print", "glib-server", "glib-client".
Use mode to invoke appropriate function.
* glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
* glib/dbus-glib-tool.h: New header, just includes GError bits
for now.
* glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
maps binding style to name.
(struct MethodInfo): Ditto.
(get_hash_keys, get_hash_key): Utility function, returns keys for
a GHashTable.
(interface_info_new, method_info_new): Initialize bindings.
(interface_info_unref, method_info_unref): Destroy bindings.
(method_info_get_binding_names, method_info_get_binding_name)
(interface_info_get_binding_names, interface_info_get_binding_name):
Functions for retrieving binding names.
(method_info_set_binding_name, interface_info_set_binding_name):
Functions for setting binding names.
* glib/dbus-binding-tool-glib.h: New file, has prototypes
for glib binding generation.
* glib/dbus-binding-tool-glib.c: New file, implements server-side
and client-side glib glue generation.
* glib/Makefile.am (dbus_binding_tool_SOURCES): Add
dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
dbus-glib-tool.h.
* dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
of using GClosureMarshal directly.
(struct DBusGObjectInfo): Add n_infos member.
* test/glib/test-service-glib.xml: New file; contains introspection data
for MyTestObject used in test-service-glib.c.
* test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
(my_object_do_nothing, my_object_increment, my_object_throw_error)
(my_object_uppercase, my_object_many_args): New test methods.
(main): Use dbus_g_object_class_install_info to include generated object
info.
* test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
as well as client-side bindings.
* test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
(main): Activate TestSuiteGLibService; test invoke a bunch of its methods
using both the dbus_gproxy stuff directly as well as the generated bindings.
Havoc Pennington [Wed, 16 Feb 2005 04:37:27 +0000 (04:37 +0000)]
2005-02-15 Havoc Pennington <hp@redhat.com>
* dbus/dbus-connection.c (dbus_connection_dispatch): always
complete a pending call, don't run filters first.
* glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
dbus_pending_call_steal_reply
* dbus/dbus-pending-call.c (dbus_pending_call_block): just call
_dbus_connection_block_pending_call
(dbus_pending_call_get_reply): change to steal_reply and return a
ref
* dbus/dbus-connection.c
(dbus_connection_send_with_reply_and_block): port to work in terms
of DBusPendingCall
(_dbus_connection_block_pending_call): replace block_for_reply
with this
Havoc Pennington [Mon, 14 Feb 2005 19:07:29 +0000 (19:07 +0000)]
2005-02-14 Havoc Pennington <hp@redhat.com>
* dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
properly handle looking up group information by name; fix
from j@bootlab.org
Havoc Pennington [Sun, 13 Feb 2005 20:23:30 +0000 (20:23 +0000)]
oops, committed some debug junk
Havoc Pennington [Sun, 13 Feb 2005 20:21:59 +0000 (20:21 +0000)]
2005-02-13 Havoc Pennington <hp@redhat.com>
* dbus/dbus-connection.c (dbus_connection_return_message)
(dbus_connection_borrow_message): hold dispatch lock while message
is outstanding
(_dbus_connection_block_for_reply): hold dispatch lock while we
block for the reply, so nobody steals our reply
(dbus_connection_pop_message): hold the dispatch lock while we
pluck the message
Havoc Pennington [Sun, 13 Feb 2005 19:49:22 +0000 (19:49 +0000)]
2005-02-13 Havoc Pennington <hp@redhat.com>
* dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
(_dbus_connection_release_dispatch)
(_dbus_connection_acquire_io_path)
(_dbus_connection_release_io_path): make the mutex and condvar
control access to the "acquired" flag. Drop the connection lock
while waiting on the condvar. Hopefully these are baby steps in
roughly the right direction.
Havoc Pennington [Sun, 13 Feb 2005 18:17:35 +0000 (18:17 +0000)]
2005-02-13 Havoc Pennington <hp@redhat.com>
* dbus/dbus-connection.c: use separate mutexes for the condition
variables; this is some kind of baseline for sanity, but the
condition variables still aren't used correctly afaict
Havoc Pennington [Sun, 13 Feb 2005 17:16:25 +0000 (17:16 +0000)]
2005-02-13 Havoc Pennington <hp@redhat.com>
* dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
fix a double-unlock
* dbus/dbus-connection.c
(_dbus_connection_detach_pending_call_unlocked): add this
Initial semi-correct pass through to fix thread locking; there are
still some issues with the condition variable paths I'm pretty
sure
* dbus/dbus-server.c: add a mutex on DBusServer and appropriate
lock/unlock calls
* dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
rename to add _unlocked
(struct DBusConnection): move "dispatch_acquired" and
"io_path_acquired" to use only one bit each.
(CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
(dbus_connection_set_watch_functions): hacky fix to reentrancy
(_dbus_connection_add_watch, _dbus_connection_remove_watch)
(_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
(_dbus_connection_remove_timeout)
(_dbus_connection_toggle_timeout): drop lock when calling out to
user functions; done in a hacky/bad way.
(_dbus_connection_send_and_unlock): add a missing unlock
(_dbus_connection_block_for_reply): add a missing unlock
* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
drop lock in a hacky probably unsafe way to call out to user
function
Havoc Pennington [Sat, 12 Feb 2005 20:27:45 +0000 (20:27 +0000)]
2005-02-12 Havoc Pennington <hp@redhat.com>
* tools/dbus-tree-view.c (info_set_func_text): display more
details on args
* bus/driver.c (bus_driver_handle_list_services): list the bus
driver
* glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
* glib/dbus-gidl.c (signal_info_get_n_args): new function
(method_info_get_n_args): new function
Havoc Pennington [Sat, 12 Feb 2005 20:13:08 +0000 (20:13 +0000)]
2005-02-12 Havoc Pennington <hp@redhat.com>
* bus/driver.c (bus_driver_handle_introspect): add introspection
for bus driver
Havoc Pennington [Sat, 12 Feb 2005 17:13:13 +0000 (17:13 +0000)]
2005-02-12 Havoc Pennington <hp@redhat.com>
* bus/driver.c: put the signature of each bus driver method in the
table of handlers and check it on incoming calls; this isn't
really useful, but going to add introspect support in a minute.
Havoc Pennington [Sat, 12 Feb 2005 04:30:34 +0000 (04:30 +0000)]
some todo and spec tweaks
Havoc Pennington [Sat, 12 Feb 2005 03:56:22 +0000 (03:56 +0000)]
forgot to commit removing address item from TODO
Joe Shaw [Sat, 12 Feb 2005 00:51:33 +0000 (00:51 +0000)]
2005-02-11 Joe Shaw <joeshaw@novell.com>
* mono/Connection.cs: The unpredictability of finalizers in mono
prevents us from deterministically disconnecting the filters from
the Service class's finalizer, so move tracking of filters and
matches here. Add API for that.
* mono/Service.cs: Remove the code, add code which calls the
methods now on the Connection class.
John (J5) Palmieri [Fri, 11 Feb 2005 19:51:18 +0000 (19:51 +0000)]
* python/dbus.py (class Sender): added to support dbus signals better
(Bus::add_signal_receiver): added expand_args parameter which defaults
to True. When expand args is True the signal handler will pass the
message arguments as parameters to the signal handler. If False
revert to previous behavior where the signal handler must get the
argument list from the message. This is to help port applications
like HAL that have a tendancy to send variable length argument lists.
self._match_rule_to_receivers is now a dict of dicts.
(Bus::remove_signal_receiver): pop handler off the dict intead of
removing it from a list
(Bus::_signal_func): change signal handlers so that interface,
signal_name, service, path and message are packed into a Sender
object and that is passed to the handler. If expand_args is True
extract the args list from the message and append it to the parameter
list
* python/dbus_bindings.pyx.in (class Signature): added to support
signiature types
(MessageIter::__init__): changed iteration limit to match D-BUS
(MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY,
STRUCT and VARIENT type support
(MessageIter::python_value_to_dbus_sig): made recursive to support
recursive types
(MessageIter::append*): added Signature, dict, tuple
support
* python/examples/example-client.py: added examples of getting tuples
and dicts
* python/examples/example-service.py: added examples of sending tuples
and dicts
* python/examples/example-signal-recipient.py: Fixed to handle new
signal callback format
Havoc Pennington [Fri, 11 Feb 2005 03:37:03 +0000 (03:37 +0000)]
2005-02-10 Havoc Pennington <hp@redhat.com>
* test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
(call dbus_g_proxy_add_signal)
* dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
escape the hostname
(_dbus_server_new_for_domain_socket): escape the path
* dbus/dbus-address.c (dbus_address_escape_value): new
(dbus_address_unescape_value): new
(dbus_parse_address): unescape values
* dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
* doc/dbus-specification.xml: explain how to escape values in
addresses
Havoc Pennington [Fri, 11 Feb 2005 01:13:45 +0000 (01:13 +0000)]
2005-02-10 Havoc Pennington <hp@redhat.com>
* dbus/dbus-message-factory.c (generate_special): modify test to
avoid using a non-basic dict key
* dbus/dbus-marshal-validate-util.c: add test for the below
* doc/dbus-specification.xml: require that dict keys are a basic
type
* dbus/dbus-marshal-validate.c
(_dbus_validate_signature_with_reason): require that dict key is a
basic type
Havoc Pennington [Thu, 10 Feb 2005 23:47:55 +0000 (23:47 +0000)]
2005-02-10 Havoc Pennington <hp@redhat.com>
* dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
change to be _and_unlock instead of _unlocked
* dbus/dbus-connection.c
(_dbus_connection_send_preallocated_unlocked_no_update): rename to
have no_update so we can find this bug quickly in future