| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* dbus/Makefile.am:
* mono/doc/Makefile.am:
* test/glib/Makefile.am:
Fix srcdir != builddir issues (Patch from Chris Wilson, #3477)
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* dbus/dbus-sysdeps.c <HAVE_CMSGCRED> (_dbus_read_credentials_unix_socket):
Fix call to dbus_set_error. (Patch from Michael Banck, #3461)
|
|
|
|
|
|
|
|
|
|
|
| |
(_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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
compilation error.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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()
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
so that it allows messages that are not signals to pass in
NULL as the interface.
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
Rename to DBUS_SERVICE_DBUS.
(DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
(DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
(DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
(DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
DBUS_INTERFACE_INTROSPECTABLE.
(DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
DBUS_INTERFACE_PROPERTIES.
(DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
DBUS_INTERFACE_PEER.
(DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL):
DBUS_INTERFACE_LOCAL.
All other users of those constants have been changed.
* bus/driver.c (bus_driver_handle_introspect): Use constants.
* glib/dbus-gobject.c (handle_introspect): Use constants.
* doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is based on initial work from
Paul Kuliniewicz <kuliniew@purdue.edu>.
* glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
initialization of GValue from dbus type to here.
(dbus_gvalue_genmarshal_name_from_type): New function; generates a string
for the "glib-genmarshal" program from a DBus type.
(dbus_gvalue_binding_type_from_type): New function; turns a DBus type
into the C name for it we use in the glib bindings.
(dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
glib C type (not GValue).
(dbus_gvalue_demarshal): invoke dbus_gvalue_init.
* glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
from dbus-gobject.c.
* glib/dbus-gutils.h: Prototype it.
* glib/dbus-gproxy.c: Include new dbus-gobject.h.
(marshal_dbus_message_to_g_marshaller): Use new shared function
dbus_glib_marshal_dbus_message_to_gvalue_array.
* glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
Will be changed once we have annotations.
* glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
GStaticRWLock. Callers updated.
(wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
(string_table_next): New function for iterating over zero-terminated
string value array.
(string_table_lookup): New function; retrieves specific entry in
array.
(get_method_data): New function; look up method data in object data chunk.
(object_error_domain_prefix_from_object_info)
(object_error_code_from_object_info): New functions, but not implemented yet.
(method_interface_from_object_info): New function; retrieve interface name.
(method_name_from_object_info): New function; retrieve method name.
(method_arg_info_from_object_info): New function; retrieve argument data.
(arg_iterate): New function; iterates over serialized argument data.
(method_dir_signature_from_object_info): New function; returns a
GString holding type signature for arguments for just one
direction (input or output).
(method_input_signature_from_object_info)
(method_output_signature_from_object_info): New functions.
(dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
converts dbus message arguments into a GValue array. Used for both
signal handling and method invocation.
(struct DBusGlibWriteIterfaceData): New utility structure.
(write_interface): New function; generate introspection XML for
an interface.
(introspect_interfaces): New function; gathers all interface->methods,
generates introspection XML for them.
(handle_introspect): Invoke introspect_interfaces.
(get_object_property): Be sure to zero-initalize stack-allocated GValue.
(lookup_object_and_method): New function; examines an incoming message
and attempts to match it up (via interface, method name, and argument
signature) with a known object and method.
(gerror_domaincode_to_dbus_error_name): New function; converts a
GError domain and code into a DBus error name. Needs GError data
added to object introspection to work well.
(gerror_to_dbus_error_message): Creates a DBusMessage error return from
GError.
(invoke_object_method): New function to invoke an object method
looked up via lookup_object_and_method. Parses the incoming
message, turns it into a GValue array, then invokes the marshaller
specified in the DBusGMethodInfo. Creates a new message with
either return values or error message as appropriate.
(gobject_message_function): Invoke lookup_object_and_method and
invoke_object_method.
* glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
(enum DBusBindingOutputMode): New enum for binding output modes.
(pretty_print): Print binding names.
(dbus_binding_tool_error_quark): GError bits.
(version): Fix typo.
(main): Create GIOChannel for output. Parse new --mode argument,
possible values are "pretty-print", "glib-server", "glib-client".
Use mode to invoke appropriate function.
* glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
* glib/dbus-glib-tool.h: New header, just includes GError bits
for now.
* glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
maps binding style to name.
(struct MethodInfo): Ditto.
(get_hash_keys, get_hash_key): Utility function, returns keys for
a GHashTable.
(interface_info_new, method_info_new): Initialize bindings.
(interface_info_unref, method_info_unref): Destroy bindings.
(method_info_get_binding_names, method_info_get_binding_name)
(interface_info_get_binding_names, interface_info_get_binding_name):
Functions for retrieving binding names.
(method_info_set_binding_name, interface_info_set_binding_name):
Functions for setting binding names.
* glib/dbus-binding-tool-glib.h: New file, has prototypes
for glib binding generation.
* glib/dbus-binding-tool-glib.c: New file, implements server-side
and client-side glib glue generation.
* glib/Makefile.am (dbus_binding_tool_SOURCES): Add
dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
dbus-glib-tool.h.
* dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
of using GClosureMarshal directly.
(struct DBusGObjectInfo): Add n_infos member.
* test/glib/test-service-glib.xml: New file; contains introspection data
for MyTestObject used in test-service-glib.c.
* test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
(my_object_do_nothing, my_object_increment, my_object_throw_error)
(my_object_uppercase, my_object_many_args): New test methods.
(main): Use dbus_g_object_class_install_info to include generated object
info.
* test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
as well as client-side bindings.
* test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
(main): Activate TestSuiteGLibService; test invoke a bunch of its methods
using both the dbus_gproxy stuff directly as well as the generated bindings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c (dbus_connection_dispatch): always
complete a pending call, don't run filters first.
* glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
dbus_pending_call_steal_reply
* dbus/dbus-pending-call.c (dbus_pending_call_block): just call
_dbus_connection_block_pending_call
(dbus_pending_call_get_reply): change to steal_reply and return a
ref
* dbus/dbus-connection.c
(dbus_connection_send_with_reply_and_block): port to work in terms
of DBusPendingCall
(_dbus_connection_block_pending_call): replace block_for_reply
with this
|
|
|
|
|
|
| |
* dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
properly handle looking up group information by name; fix
from j@bootlab.org
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c (dbus_connection_return_message)
(dbus_connection_borrow_message): hold dispatch lock while message
is outstanding
(_dbus_connection_block_for_reply): hold dispatch lock while we
block for the reply, so nobody steals our reply
(dbus_connection_pop_message): hold the dispatch lock while we
pluck the message
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
(_dbus_connection_release_dispatch)
(_dbus_connection_acquire_io_path)
(_dbus_connection_release_io_path): make the mutex and condvar
control access to the "acquired" flag. Drop the connection lock
while waiting on the condvar. Hopefully these are baby steps in
roughly the right direction.
|
|
|
|
|
|
| |
* dbus/dbus-connection.c: use separate mutexes for the condition
variables; this is some kind of baseline for sanity, but the
condition variables still aren't used correctly afaict
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
fix a double-unlock
* dbus/dbus-connection.c
(_dbus_connection_detach_pending_call_unlocked): add this
Initial semi-correct pass through to fix thread locking; there are
still some issues with the condition variable paths I'm pretty
sure
* dbus/dbus-server.c: add a mutex on DBusServer and appropriate
lock/unlock calls
* dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
rename to add _unlocked
(struct DBusConnection): move "dispatch_acquired" and
"io_path_acquired" to use only one bit each.
(CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
(dbus_connection_set_watch_functions): hacky fix to reentrancy
(_dbus_connection_add_watch, _dbus_connection_remove_watch)
(_dbus_connection_toggle_watch, _dbus_connection_add_timeout)
(_dbus_connection_remove_timeout)
(_dbus_connection_toggle_timeout): drop lock when calling out to
user functions; done in a hacky/bad way.
(_dbus_connection_send_and_unlock): add a missing unlock
(_dbus_connection_block_for_reply): add a missing unlock
* dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
drop lock in a hacky probably unsafe way to call out to user
function
|