Colin Walters [Thu, 16 Jun 2005 04:48:10 +0000 (04:48 +0000)]
2005-06-16 Colin Walters <walters@verbum.org>
* tools/dbus-send.c (append_array): Use strtok.
(append_dict): New function.
(type_from_name): New function, extracted from main.
(main): Handle sending dicts.
* tools/dbus-print-message.c (print_iter): Print dict
entries.
Colin Walters [Thu, 16 Jun 2005 04:38:11 +0000 (04:38 +0000)]
2005-06-16 Colin Walters <walters@verbum.org>
* glib/dbus-gvalue.c (marshal_basic): Marshal NULL string
values as the empty string (#2948).
Colin Walters [Thu, 16 Jun 2005 04:32:50 +0000 (04:32 +0000)]
2005-06-16 Colin Walters <walters@verbum.org>
* dbus/Makefile.am:
* mono/doc/Makefile.am:
* test/glib/Makefile.am:
Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
Colin Walters [Thu, 16 Jun 2005 04:27:45 +0000 (04:27 +0000)]
2005-06-16 Colin Walters <walters@verbum.org>
* dbus/dbus-marshal-header.c (_dbus_header_load): Set
header byte order from expected byte order (Patch from Chris Wilson, #3475).
* dbus/dbus-marshal-byteswap.c (byteswap_body_helper):
Increment pointer after swapping fixed array. Add assertion
for array length.
Colin Walters [Wed, 15 Jun 2005 19:33:04 +0000 (19:33 +0000)]
2005-06-15 Colin Walters <walters@verbum.org>
* dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (_dbus_read_credentials_unix_socket):
Fix call to dbus_set_error. (Patch from Michael Banck, #3461)
John (J5) Palmieri [Wed, 15 Jun 2005 18:35:18 +0000 (18:35 +0000)]
* Bumped version for CVS HEAD
John (J5) Palmieri [Wed, 15 Jun 2005 18:32:32 +0000 (18:32 +0000)]
* NEWS: Update to 0.34
John (J5) Palmieri [Wed, 15 Jun 2005 16:20:28 +0000 (16:20 +0000)]
* dbus/dbus-connection.c (_dbus_connection_peer_filter): New method
(_dbus_connection_run_builtin_filters): New method
(dbus_connection_dispatch): Run the builtin filters which in turn
runs the peer filter which handles Ping messages.
* doc/TODO:
- Ping isn't handled: This patch fixes it
- Add a test case for the Ping message: added TODO item
John (J5) Palmieri [Wed, 15 Jun 2005 15:59:57 +0000 (15:59 +0000)]
* dbus/dbus-message.c:
(dbus_message_has_path): New method
(dbus_message_has_interface): New method
(dbus_message_has_member): New method
* dbus/dbus/dbus-sysdeps.c (_dbus_check_dir_is_private_to_user):
New method
* dbus/dbus-keyring.c (_dbus_keyring_reload): Check to see that
the keyring directory is private to the user
* doc/TODO:
- The convenience functions in dbus-bus.h should perhaps have
the signatures that they would have if they were autogenerated
stubs. e.g. the acquire service function. We should also evaluate
which of these functions to include, in light of the fact that
GLib/Qt native stubs will probably also exist.: Punted
- add dbus_message_has_path(), maybe has_member/interface:
fixed in this patch
- in dbus-keyring.c, enforce that the keyring dir is not
world readable/writable: Fixed in this patch
John (J5) Palmieri [Wed, 15 Jun 2005 15:15:32 +0000 (15:15 +0000)]
* dbus/dbus-marshal-validate.h: Added a new validation
error code DBUS_VALIDITY_UNKNOWN_OOM_ERROR = -4 for
out of memory errors when validating signitures
* dbus/dbus-marshal-header.c: use DBUS_VALIDITY_UNKNOWN_OOM_ERROR
in places where we previously used DBUS_VALID and a FALSE return
value to indicate OOM
* dbus/dbus-marshal-validate.c (_dbus_validate_signature_with_reason):
Use a stack to track the number of elements inside containers. The
stack values are then used to validate that dict entries have only two
elements within them.
(validate_body_helper): check the reason for failure when validating
varients
* dbus/dbus-message.c (load_message): use
DBUS_VALIDITY_UNKNOWN_OOM_ERROR in places where we previously used
DBUS_VALID and a FALSE return value to indicate OOM
* doc/TODO: remove "- validate dict entry number of fields" as this
patch fixes it
David Zeuthen [Wed, 15 Jun 2005 02:31:38 +0000 (02:31 +0000)]
2005-06-14 David Zeuthen <davidz@redhat.com>
* bus/bus.c (process_config_every_time): Drop existing conf-dir
watches (if applicable) and add new watches
* bus/main.c (signal_handler): Handle SIGIO if using D_NOTIFY
(main): Setup SIGIO signal handler if using D_NOTIFY
* bus/config-parser.h: Add prototype bus_config_parser_get_conf_dirs
* bus/config-parser.c (struct BusConfigParser): Add conf_dirs list
(merge_included): Also merge conf_dirs list
(bus_config_parser_unref): Clear conf_dirs list
(include_dir): Add directory to conf_dirs list
(bus_config_parser_get_conf_dirs): New function
* bus/dir-watch.[ch]: New files
* bus/Makefile.am (BUS_SOURCES): Add dir-watch.[ch]
* configure.in: Add checks for D_NOTIFY on Linux
Colin Walters [Tue, 14 Jun 2005 15:55:10 +0000 (15:55 +0000)]
2005-06-14 Colin Walters <walters@verbum.org>
* glib/dbus-binding-tool-glib.c:
* glib/dbus-gobject.c:
* glib/dbus-gvalue.c: Fix indentation and brace style.
Colin Walters [Tue, 14 Jun 2005 15:52:41 +0000 (15:52 +0000)]
2005-06-14 Ross Burton <ross@burtonini.com>.
* glib/dbus-glib.h: Make DBusGMethodInvocation
a private structure. Rearrange prototypes a bit.
* glib/dbus-gproxy.c (dbus_g_proxy_invoke): Add
documentation for first_arg_type.
* glib/dbus-gobject.c: Move DBusGMethodInvocation
here, add documentation. Move dbus_g_method_return
and dbus_g_method_return_error into public API
section.
Colin Walters [Tue, 14 Jun 2005 14:23:56 +0000 (14:23 +0000)]
2005-06-14 Colin Walters <walters@verbum.org>
* glib/dbus-gobject.c (_dbus_gobject_lookup_marshaller):
Add missing return statements, noticed by Ross Burton.
Colin Walters [Mon, 13 Jun 2005 15:36:31 +0000 (15:36 +0000)]
2005-06-13 Ross Burton <ross@burtonini.com>.
* glib/dbus-gobject.c: Handle errors on message
demarshalling by sending error message back.
* glib/dbus-gvalue.c: Initialize return variables.
Colin Walters [Mon, 13 Jun 2005 15:34:14 +0000 (15:34 +0000)]
2005-06-13 Colin Walters <walters@verbum.org>
* glib/Makefile.am: Fix thinko in last patch.
Colin Walters [Mon, 13 Jun 2005 14:56:51 +0000 (14:56 +0000)]
2005-06-13 Colin Walters <walters@verbum.org>
* glib/Makefile.am: Move dbus-gtype-specialized.c
and dbus-gtype-specialized.h into a _HEADERS variable,
install them.
Colin Walters [Mon, 13 Jun 2005 03:01:30 +0000 (03:01 +0000)]
2005-06-12 Colin Walters <walters@verbum.org>
Async signals and various bugfixes and testing by
Ross Burton <ross@burtonini.com>.
* glib/dbus-gvalue.h: (struct DBusBasicGValue): Delete.
(dbus_gvalue_genmarshal_name_from_type)
(dbus_gvalue_ctype_from_type): Moved to dbus-binding-tool-glib.c.
(dbus_gtype_to_dbus_type): Renamed to dbus_gtype_from_signature.
(dbus_g_value_types_init, dbus_gtype_from_signature)
(dbus_gtype_from_signature_iter, dbus_gtype_to_signature)
(dbus_gtypes_from_arg_signature): New function prototypes.
(dbus_gvalue_demarshal): Take context and error arguments.
(dbus_gvalue_demarshal_variant): New function.
(dbus_gvalue_demarshal_message): New function.
(dbus_gvalue_store): Delete.
* glib/dbus-gvalue.c:
File has been almost entirely rewritten; now we special-case
more types such as DBUS_TYPE_SIGNATURE, handle arrays and
hash tables correctly, etc. Full support for recursive values
is not yet complete.
* glib/dbus-gproxy.c (dbus_g_proxy_class_init): Change last
argument of signal to G_TYPE_POINTER since we now pass a
structure.
(lookup_g_marshaller): Delete in favor of
_dbus_gobject_lookup_marshaller.
(marshal_dbus_message_to_g_marshaller): Use
_dbus_gobject_lookup_marshaller and dbus_gvalue_demarshal_message
to handle remote signal callbacks.
(dbus_g_proxy_new_from_proxy): New function; creates a new
DBusGProxy by copying an existing one.
(dbus_g_proxy_get_interface, dbus_g_proxy_set_interface)
(dbus_g_proxy_get_path): New functions.
(dbus_g_proxy_marshal_args_to_message): New function;
factored out of existing code.
(DBUS_G_VALUE_ARRAY_COLLECT_ALL): Collect all arguments
from a varargs array.
(dbus_g_proxy_begin_call_internal): New function.
(dbus_g_proxy_end_call_internal): New function.
(dbus_g_proxy_begin_call): Take GTypes instead of DBus types
as arguments; simply invoke dbus_g_proxy_begin_call_internal
after collecting args into value array.
(dbus_g_proxy_end_call): Take GTypes instead of DBus types;
invoke dbus_g_proxy_end_call_internal.
(dbus_g_proxy_invoke): Simply invoke begin_call_interanl and
end_call_internal.
(dbus_g_proxy_call_no_reply): Take GTypes instead of DBus
types.
(array_free_all): New function.
(dbus_g_proxy_add_signal): Take GTypes.
* glib/dbus-gobject.h:
(_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
(_dbus_gobject_get_path, _dbus_gobject_lookup_marshaller):
Prototype.
* glib/dbus-gobject.c: Add a global marshal_table hash which
stores mappings from type signatures to marshallers. Change lots
of invocations of dbus_gtype_to_dbus_type to
dbus_gtype_to_signature.
(_dbus_glib_marshal_dbus_message_to_gvalue_array): Delete.
(introspect_signals): Fix test for query.return_type.
(set_object_property): Update invocation of dbus_gvalue_demarshal.
(invoke_object_method): Many changes. Handle asynchronous
invocations. Convert arguments with
dbus_gvalue_demarshal_message. Handle errors. Use
DBusSignatureIter instead of strlen on args. Handle all arguments
generically. Special-case variants.
(dbus_g_method_return, dbus_g_method_return_error): New function.
(DBusGSignalClosure): New structure, closes over signal
information.
(dbus_g_signal_closure_new): New function.
(dbus_g_signal_closure_finalize): New function.
(signal_emitter_marshaller): New function; is special marshaller
which emits signals on bus.
(export_signals): New function; introspects object signals and
connects to them.
(dbus_g_object_type_install_info): Take GType instead of
GObjectClass.
(dbus_g_connection_register_g_object): Invoke export_signals.
(dbus_g_connection_lookup_g_object): New function.
(DBusGFuncSignature) New structure; used for mapping type
signatures to marshallers.
(funcsig_hash): New function; hashes DBusGFuncSignature.
(funcsig_equal): New function; compares DBusGFuncSignature.
(_dbus_gobject_lookup_marshaller): New function.
(dbus_g_object_register_marshaller): New function; used to
register a marshaller at runtime for a particular signature.
* glib/dbus-gmain.c (_dbus_gmain_test): Add various tests.
* glib/dbus-binding-tool-glib.h: Add DBUS_GLIB_ANNOTATION_ASYNC
which notes a server method implementation should be
asynchronous.
* glib/dbus-binding-tool-glib.c
(dbus_binding_tool_output_glib_server): Call
dbus_g_value_types_init.
(write_formal_parameters): Use dbus_gtype_from_signature. Handle
variants specially.
(dbus_g_type_get_lookup_function): Turn GType into an invocation
of a lookup function.
(write_args_for_direction): Use dbus_g_type_get_lookup_function.
(write_untyped_out_args): New method; write output arguments.
(write_formal_declarations_for_direction): Function for
writing prototypes.
(write_formal_parameters_for_direction): Function for
writing implementations.
(write_typed_args_for_direction): Function for writing
arguments prefixed with GTypes.
(write_async_method_client): Write out async version
of method.
* glib/dbus-binding-tool-glib.c: Include dbus-gvalue-utils.h.
(dbus_g_type_get_marshal_name): Move mapping from GType
to marshal name into here.
(dbus_g_type_get_c_name): Move into here.
(compute_marshaller): Convert signature to type with
dbus_gtype_from_signature, use dbus_g_type_get_marshal_name.
(compute_marshaller_name): Ditto.
(compute_marshaller): Handle async signal annotations.
(gather_marshallers): Return if we don't have a known
prefix.
(generate_glue): Collect introspection blob here, and
write all of the blob at the end. This allows an object
with multiple interfaces to work.
Mark async methods in introspection blob.
* glib/Makefile.am (libdbus_glib_1_la_SOURCES): Add
dbus-gtype-specialized.c, dbus-gtype-specialized.h,
dbus-gvalue-utils.h, dbus-gvalue-utils.c.
* dbus/dbus-glib.h: Don't include dbus-protocol.h; this
avoids people accidentally using DBUS_TYPE_* which should
not be necessary anymore.
Do include dbus-gtype-specialized.h, which are utilities
for GLib container types.
Add various #defines for types such as
DBUS_TYPE_G_BOOLEAN_ARRAY.
(DBusGValueIterator, DBusGValue): Define, not fully used
yet.
(dbus_g_value_get_g_type): Type for recursive value.
(dbus_g_value_open, dbus_g_value_iterator_get_value)
(dbus_g_value_iterator_get_values, dbus_g_value_iterator_recurse)
(dbus_g_value_free): Prototypes.
(dbus_g_object_register_marshaller, dbus_g_proxy_new_from_proxy): Prototype.
(dbus_g_proxy_set_interface): Prototype.
(dbus_g_proxy_begin_call, dbus_g_proxy_end_call)
(dbus_g_proxy_call_no_reply): Take GLib types instead of DBus
types.
(dbus_g_proxy_get_path, dbus_g_proxy_get_interface):
Accessors.
(DBusGAsyncData, DBusGMethodInvocation): Structures for
doing async invocations.
(dbus_g_method_return, dbus_g_method_return_error):
Prototypes.
* doc/dbus-tutorial.xml: Update GLib section.
* tools/dbus-viewer.c (load_child_nodes): Update
for new invocation type of dbus_g_proxy_end_call.
(load_from_service_thread_func): Ditto.
* tools/print-introspect.c (main): Ditto.
* tools/dbus-names-model.c (have_names_notify)
(names_model_reload, names_model_set_connection)
Use GTypes.
* python/Makefile.am (INCLUDES): Define DBUS_COMPILATION,
needed since Python bindings use GLib bindings.
* test/glib/Makefile.am (INCLUDES): Define DBUS_COMPILATION.
Add --prefix argument.
* tools/Makefile.am: Define DBUS_COMPILATION. Remove
unneeded --ignore-unsupported arg.
* test/glib/test-service-glib.c:
* test/glib/test-service-glib.xml:
* test/glib/test-dbus-glib.c: Add many more tests.
David Zeuthen [Mon, 6 Jun 2005 18:55:22 +0000 (18:55 +0000)]
2005-06-06 David Zeuthen <davidz@redhat.com>
* doc/TODO: Add item about need to remove deprecated functions.
* dbus/dbus-connection.h: Add prototype for dbus_connection_disconnect
* dbus/dbus-connection.c (dbus_connection_disconnect): New function
to repair the ABI which was broken with the last commit.
John (J5) Palmieri [Thu, 2 Jun 2005 21:32:31 +0000 (21:32 +0000)]
* doc/TODO: remove connection_open/connection_disconnect lacks symmetry item that was just fixed
John (J5) Palmieri [Thu, 2 Jun 2005 18:22:04 +0000 (18:22 +0000)]
* tools/dbus-send.c (main):
s/dbus_connection_disconnect/dbus_connection_close
* test/glib/test-profile.c (no_bus_thread_func, with_bus_thread_func):
s/dbus_connection_disconnect/dbus_connection_close
* test/test-service.c (path_message_func, filter_func):
s/dbus_connection_disconnect/dbus_connection_close
John (J5) Palmieri [Thu, 2 Jun 2005 17:41:04 +0000 (17:41 +0000)]
* dbus/dbus-connection.c, dbus/dbus-connection.h
(dbus_connection_disconnect): renamed to dbus_connection_close
for API symmetry with dbus_connection_open
(_dbus_connection_open_internal):
s/dbus_connection_disconnect/dbus_connection_close
* dbus/dbus-bus.c (dbus_bus_get):
s/dbus_connection_disconnect/dbus_connection_close
* bus/connection.c (bus_connections_unref,
bus_connections_setup_connection, bus_connections_expire_incomplete):
s/dbus_connection_disconnect/dbus_connection_close
* bus/dispatch.c (bus_dispatch, kill_client_connection,
kill_client_connection_unchecked, check_hello_connection):
s/dbus_connection_disconnect/dbus_connection_close
* bus/bus.c (new_connection_callback):
s/dbus_connection_disconnect/dbus_connection_close
Colin Walters [Wed, 25 May 2005 16:03:53 +0000 (16:03 +0000)]
2005-05-25 Colin Walters <walters@verbum.org>
* dbus/dbus-protocol.h: Move various bus service #defines such
as DBUS_SERVICE_DBUS and DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT to
dbus/dbus-shared.h.
* dbus/dbus-shared.h: Various defines moved here.
* dbus/dbus-marshal-header.c: Include dbus-shared.h.
John (J5) Palmieri [Tue, 24 May 2005 16:34:38 +0000 (16:34 +0000)]
* python/__init__.py: Python bindings deserve a minor version
update. Upped to (0, 40, 2)
John (J5) Palmieri [Tue, 24 May 2005 16:30:51 +0000 (16:30 +0000)]
* python/decorators.py: add explicitly_pass_message decorator
for passing in the dbus message as keyword for edge case signal
handling
* python/matchrules.py (SignalMatchRule.__repr__): fix output
to conform with what dbus expects for match rules
(SignalMatchRule.execute): add the dbus message as a keyword
if the signal handler has requested it
* python/examples/example/signal-recipient.py: added some more
examples on how to hook up to signals
* python/proxies.py: minor formatting changes
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.