platform/upstream/dbus.git
19 years ago2005-06-26 Colin Walters <walters@verbum.org>
Colin Walters [Sun, 26 Jun 2005 17:02:09 +0000 (17:02 +0000)]
2005-06-26  Colin Walters  <walters@verbum.org>

* glib/dbus-glib.c (dbus_set_g_error): Delete.
(dbus_g_error_set): New public function from its ashes; used by
both service-side method implementation and GLib bindings
internals.
(dbus_g_error_has_name, dbus_g_error_get_name): New function.
(_dbus_glib_test): Add some tests.

* test/glib/test-dbus-glib.c (main): Test dbus_g_error_has_name.

* test/glib/test-service-glib.c (my_object_throw_error): Use
dbus_g_error_set.

* glib/dbus-gobject.c (gerror_to_dbus_error_message): Handle
errors thrown by dbus_g_error_set.

* glib/dbus-gmain.c (dbus_g_bus_get): Change to dbus_g_error_set.

* glib/dbus-gparser.c (validate_signature): Ditto.

* glib/dbus-gproxy.c (dbus_g_proxy_new_for_name_owner)
(dbus_g_proxy_end_call_internal): Ditto.

* glib/Makefile.am: Generate dbus-glib-error-switch.h, which
converts DBUS_ERROR_x to DBUS_GERROR_x.
(libdbus_glib_1_la_SOURCES, BUILT_SOURCES, CLEANFILES): Add it.

* doc/TODO: Remove error TODO.

* doc/dbus-tutorial.xml: Update with documentation about error
handling.

* dbus/make-dbus-glib-error-enum.sh: Tighten up regexp to make
sure we only change DBUS_ERROR to DBUS_GERROR, not all ERROR to
GERROR.  Also add DBUS_GERROR_REMOTE_EXCEPTION.

19 years ago2005-06-22 Colin Walters <walters@verbum.org>
Colin Walters [Wed, 22 Jun 2005 23:35:32 +0000 (23:35 +0000)]
2005-06-22  Colin Walters  <walters@verbum.org>

Patch from Ross Burton <ross@openedhand.com>

* glib/dbus-gobject.c (dbus_g_method_return): Free out_sig.

19 years ago2005-06-20 Colin Walters <walters@verbum.org>
Colin Walters [Tue, 21 Jun 2005 01:18:25 +0000 (01:18 +0000)]
2005-06-20  Colin Walters  <walters@verbum.org>

* configure.in: Add glib/examples.

* glib/Makefile.am: Add examples/

* glib/examples/.cvsignore
* glib/examples/Makefile.am
* glib/examples/example-client.c
* glib/examples/example-service.c
* glib/examples/example-service.xml
* glib/examples/example-signal-emitter.c
* glib/examples/example-signal-emitter.xml
* glib/examples/example-signal-recipient.c:
New files; GLib binding examples, ported from
python/examples.

19 years ago2005-06-20 Colin Walters <walters@verbum.org>
Colin Walters [Tue, 21 Jun 2005 00:30:20 +0000 (00:30 +0000)]
2005-06-20  Colin Walters  <walters@verbum.org>

* dbus/dbus-glib.h:
* glib/dbus-gproxy.c: Rename dbus_g_proxy_invoke to
dbus_g_proxy_call.

* glib/dbus-binding-tool-glib.c:
* doc/dbus-tutorial.xml:
* test/glib/test-dbus-glib.c: Update for rename.

19 years ago2005-06-20 Colin Walters <walters@verbum.org>
Colin Walters [Mon, 20 Jun 2005 19:54:22 +0000 (19:54 +0000)]
2005-06-20  Colin Walters  <walters@verbum.org>

Patch suggested by Ross Burton <ross@openedhand.com>

* glib/dbus-gobject.c (export_signals): Free signal name.
(g_value_init): Use G_VALUE_NOCOPY_CONTENTS to plug
memory leak.  Add a bit of documentation.
(dbus_g_method_return_error): Free context, and note we do
so.

19 years ago2005-06-18 Murray Cumming <murrayc@murrayc.com>
Murray Cumming [Sun, 19 Jun 2005 15:31:25 +0000 (15:31 +0000)]
2005-06-18  Murray Cumming  <murrayc@murrayc.com>

        * dbus/dbus-glib.h:
        * glib/dbus-gobject.c:
        * glib/dbus-gproxy.c:
        * glib/dbus-gvalue.c: Predeclare structs as
        typedef struct _Something Something instead of
        typedef struct Something Something, so we can
        redeclare the prototypes. Other GNOME libraries
        do this already.

19 years ago2005-06-17 Colin Walters <walters@verbum.org>
Colin Walters [Fri, 17 Jun 2005 17:10:41 +0000 (17:10 +0000)]
2005-06-17  Colin Walters  <walters@verbum.org>

* tools/dbus-names-model.c (have_names_notify): Fix call
to dbus_g_proxy_end_call.

19 years ago2005-06-17 Colin Walters <walters@verbum.org>
Colin Walters [Fri, 17 Jun 2005 14:29:48 +0000 (14:29 +0000)]
2005-06-17  Colin Walters  <walters@verbum.org>

* glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): Don't
spew warnings if we get malformed remote signals.

* glib/dbus-gobject.c (propsig_iterate): New function.
(lookup_object_info): New function, extracted from
lookup_object_and_method.
(introspect_properties, introspect_signals): Delete; these
are merged into write_interface.
(write_interface): Write out signals and properties here;
dump the org.gtk.object stuff and use the interface given
in the introspection data blob.  Also fix up property XML.
(lookup_values): New function.
(introspect_interfaces): Gather a mapping from interface to a
list of its methods, signals, and properties, then write out
each interface.
(lookup_object_and_method): Use lookup_object_info.
(struct DBusGSignalClosure): Add interface.
(dbus_g_signal_closure_new): Add interface. Don't dup signame;
we can just use the constant data.
(dbus_g_signal_closure_finalize): Don't free signal name.
(signal_emitter_marshaller): Use interface from signal closure.
(export_signals): Only export signals mentioned in introspection
blob.
(dbus_g_connection_register_g_object): Warn if we have no
introspection data for an object.
(funcsig_equal): Remove unused variable.
(dbus_g_object_register_marshaller): Take varargs instead of
list.
(dbus_g_object_register_marshaller_array): New function,
extracted from old dbus_g_object_register_marshaller.

* glib/dbus-binding-tool-glib.c (struct DBusBindingToolCData): Add
signals and property data.
(write_quoted_string): New function, extracted from generate_glue.
(generate_glue): Write signals and properties to introspection
blob.

* dbus/dbus-glib.h (struct DBusGObjectInfo): Include
exported_signals and exported_properties.
(dbus_g_object_register_marshaller): Update prototype.
(dbus_g_object_register_marshaller_array): Prototype.

* test/glib/test-dbus-glib.c: Extend testing to cover new signals.

* test/glib/test-service-glib.c: Add new test signals and method
to emit them.

* test/glib/test-service-glib.xml: Add some test signals.

* test/glib/Makefile.am (BUILT_SOURCES): Add my-object-marshal.c
and my-object-marshal.h
(test_service_glib_SOURCES, test_dbus_glib_SOURCES): Add
my-object-marshal.c.
(my-object-marshal.c, my-object-marshal.h): Implement.

* test/glib/.cvsignore: Update.

* doc/TODO: Remove two GLib TODO items fixed by this
patch.

19 years ago2005-06-16 Colin Walters <walters@verbum.org>
Colin Walters [Thu, 16 Jun 2005 19:57:31 +0000 (19:57 +0000)]
2005-06-16  Colin Walters  <walters@verbum.org>

* doc/TODO: Update for GLib bindings.

19 years ago2005-06-16 Colin Walters <walters@verbum.org>
Colin Walters [Thu, 16 Jun 2005 19:50:25 +0000 (19:50 +0000)]
2005-06-16  Colin Walters  <walters@verbum.org>

* glib/dbus-binding-tool-glib.c:
* glib/dbus-gobject.c:
* glib/dbus-gproxy.c:  Add Nokia copyright; Patch
from Ross Burton, for his GLib bindings work.

19 years ago2005-06-16 Colin Walters <walters@verbum.org>
Colin Walters [Thu, 16 Jun 2005 19:45:49 +0000 (19:45 +0000)]
2005-06-16  Colin Walters  <walters@verbum.org>

* glib/dbus-gobject.c (funcsig_hash, funcsig_equal): Use n_params
to iterate instead of walking to G_TYPE_INVALID.

Patch based on a patch from Ryan Gammon.

19 years ago2005-06-16 Colin Walters <walters@verbum.org>
Colin Walters [Thu, 16 Jun 2005 06:05:09 +0000 (06:05 +0000)]
2005-06-16  Colin Walters  <walters@verbum.org>

* bus/bus.c (bus_context_new): Set parser to NULL
after we unref it (Patch from Chris Boscolo, #2174).

19 years ago2005-06-16 Colin Walters <walters@verbum.org>
Colin Walters [Thu, 16 Jun 2005 05:51:46 +0000 (05:51 +0000)]
2005-06-16  Colin Walters  <walters@verbum.org>

* python/dbus_bindings.pyx.in: Import size_t,
__int64_t, __uint64_t, and __signed.

* dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (write_credentials_byte):
Define cmsg struct, output it.
(_dbus_read_credentials_unix_socket):
Use cmsg struct.

Patch from Joe Markus Clarke for FreeBSD support.

19 years ago2005-06-16 Colin Walters <walters@verbum.org>
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.

19 years ago2005-06-16 Colin Walters <walters@verbum.org>
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).

19 years ago2005-06-16 Colin Walters <walters@verbum.org>
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)

19 years ago2005-06-16 Colin Walters <walters@verbum.org>
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.

19 years ago2005-06-15 Colin Walters <walters@verbum.org>
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)

19 years ago* Bumped version for CVS HEAD
John (J5) Palmieri [Wed, 15 Jun 2005 18:35:18 +0000 (18:35 +0000)]
* Bumped version for CVS HEAD

19 years ago* NEWS: Update to 0.34 dbus-0.34.0
John (J5) Palmieri [Wed, 15 Jun 2005 18:32:32 +0000 (18:32 +0000)]
* NEWS: Update to 0.34

19 years ago * dbus/dbus-connection.c (_dbus_connection_peer_filter): New method
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

19 years ago * dbus/dbus-message.c:
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

19 years ago * dbus/dbus-marshal-validate.h: Added a new validation
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

19 years ago2005-06-14 David Zeuthen <davidz@redhat.com>
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

19 years ago2005-06-14 Colin Walters <walters@verbum.org>
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.

19 years ago2005-06-14 Ross Burton <ross@burtonini.com>.
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.

19 years ago2005-06-14 Colin Walters <walters@verbum.org>
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.

19 years ago2005-06-13 Ross Burton <ross@burtonini.com>.
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.

19 years ago2005-06-13 Colin Walters <walters@verbum.org>
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.

19 years ago2005-06-13 Colin Walters <walters@verbum.org>
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.

19 years ago2005-06-12 Colin Walters <walters@verbum.org>
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.

19 years ago2005-06-06 David Zeuthen <davidz@redhat.com>
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.

19 years ago * doc/TODO: remove connection_open/connection_disconnect lacks symmetry item that...
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

19 years ago * tools/dbus-send.c (main):
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

19 years ago * dbus/dbus-connection.c, dbus/dbus-connection.h
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

19 years ago2005-05-25 Colin Walters <walters@verbum.org>
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.

19 years ago* python/__init__.py: Python bindings deserve a minor version
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)

19 years ago* python/decorators.py: add explicitly_pass_message decorator
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

19 years ago* python/decorators.py: import dbus_bindings
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.

19 years ago- s/TYPE_PATH/TYPE_OBJECT_PATH
John (J5) Palmieri [Thu, 19 May 2005 20:27:19 +0000 (20:27 +0000)]
- s/TYPE_PATH/TYPE_OBJECT_PATH

19 years ago2005-05-18 Havoc Pennington <hp@redhat.com>
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.

19 years ago* glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
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.

19 years ago2005-05-11 Ross Burton <ross@burtonini.com>
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.

19 years ago2005-05-11 Colin Walters <walters@verbum.org>
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.

19 years ago2005-05-11 Colin Walters <walters@verbum.org>
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.

19 years ago2005-05-11 Colin Walters <walters@verbum.org>
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.

19 years ago2005-05-08 Havoc Pennington <hp@redhat.com>
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.

19 years ago2005-05-05 Havoc Pennington <hp@redhat.com>
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

19 years ago* Fix my name in previous changelog ;)
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).

19 years ago* python/Makefile.am: changed to use pyexecdir for the binding
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)

19 years ago2005-05-03 Ross Burton <ross@burtonini.com>
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.

19 years ago* python/dbus_bindings.pyx.in:
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

19 years ago* update configure.in to next version
John (J5) Palmieri [Tue, 26 Apr 2005 00:56:26 +0000 (00:56 +0000)]
* update configure.in to next version

19 years ago* Update to 0.33 dbus-0.33.0
John (J5) Palmieri [Tue, 26 Apr 2005 00:54:52 +0000 (00:54 +0000)]
* Update to 0.33

19 years ago* python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
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

19 years ago2005-04-23 Havoc Pennington <hp@redhat.com>
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()

19 years ago* dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
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

19 years ago* dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
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.

19 years ago2005-04-18 David Zeuthen <davidz@redhat.com>
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.

19 years ago2005-04-13 David Zeuthen <davidz@redhat.com>
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 :-).

19 years ago2005-04-13 David Zeuthen <davidz@redhat.com>
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

19 years ago2005-04-13 David Zeuthen <davidz@redhat.com>
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()

19 years ago2005-04-13 Havoc Pennington <hp@redhat.com>
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

19 years ago2005-04-09 Havoc Pennington <hp@redhat.com>
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

19 years ago2005-04-09 Havoc Pennington <hp@redhat.com>
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

19 years ago2005-04-05 David Zeuthen <davidz@redhat.com>
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

19 years ago2005-03-30 Havoc Pennington <hp@redhat.com>
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

19 years ago- bump to next release
John (J5) Palmieri [Tue, 29 Mar 2005 18:33:27 +0000 (18:33 +0000)]
- bump to next release

19 years ago* News: Update 0.32 dbus-0.32.0
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.

19 years ago* python/lvalue_cast_post_process.py - removed. Patch has been
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

19 years ago2005-03-24 Daniel Reed <n@ml.org>
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.

19 years agoadd colin to patch approver list (the list is really wonky/out-of-date in more ways...
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)

19 years ago* tools/Makefile.am: Patch by Colin Walters that fixes distcheck
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.

19 years ago* python/lvalue_cast_post_process.py - added post processor to fix Pyrex
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

19 years ago2005-03-20 Colin Walters <walters@verbum.org>
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.

19 years ago2005-03-20 Colin Walters <walters@verbum.org>
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.

19 years ago2005-03-17 Tom Parker <palfrey@tevp.net>
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.

19 years ago2005-03-17 Tom Parker <palfrey@tevp.net>
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.

19 years ago*** empty log message ***
Colin Walters [Thu, 17 Mar 2005 17:53:31 +0000 (17:53 +0000)]
*** empty log message ***

19 years ago2005-03-17 Colin Walters <walters@verbum.org>
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.

19 years ago2005-03-14 Colin Walters <walters@verbum.org>
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.

19 years ago2005-03-15 Joe Shaw <joeshaw@novell.com>
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.

19 years ago2005-03-13 Joe Shaw <joeshaw@novell.com>
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.

19 years ago2005-03-12 Joe Shaw <joeshaw@novell.com>
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.

19 years ago2005-03-12 Joe Shaw <joeshaw@novell.com>
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.

19 years ago2005-03-12 Joe Shaw <joeshaw@novell.com>
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.

19 years ago2005-03-12 Joe Shaw <joeshaw@novell.com>
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>

19 years ago*** empty log message ***
Joe Shaw [Sun, 13 Mar 2005 01:13:04 +0000 (01:13 +0000)]
*** empty log message ***

19 years ago2005-03-12 Colin Walters <walters@verbum.org>
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.

19 years ago2005-03-11 Colin Walters <walters@verbum.org>
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.

19 years ago2005-03-11 Joe Shaw <joeshaw@novell.com>
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.

19 years ago2005-03-09 Joe Shaw <joeshaw@novell.com>
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.

19 years ago2005-03-09 Colin Walters <walters@verbum.org>
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.

19 years ago2005-03-08 Joe Shaw <joeshaw@novell.com>
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.

19 years ago2005-03-08 Joe Shaw <joeshaw@novell.com>
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.

19 years ago* Bump version number after makeing a release
John (J5) Palmieri [Mon, 7 Mar 2005 21:19:47 +0000 (21:19 +0000)]
* Bump version number after makeing a release

19 years ago* NEWS: Update for 0.31 dbus-0.31.0
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

19 years ago2005-03-05 Havoc Pennington <hp@redhat.com>
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>

19 years ago2005-03-01 Colin Walters <walters@verbum.org>
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.

19 years ago2005-03-01 Colin Walters <walters@verbum.org>
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.