(xd_signature, xd_append_arg): Handle element type detection for
empty arrays.
(Fdbus_call_method, Fdbus_send_signal): Undo type casting for
SDATA () calls; this must be solved more general.
(Fdbus_register_signal): Use SBYTES instead of strlen.
by Tom Tromey <tromey@redhat.com>
(XD_ERROR, XD_DEBUG_MESSAGE)
(XD_DEBUG_VALID_LISP_OBJECT_P): Wrap code with "do ... while (0)".
(xd_append_arg): Part for basic D-Bus types rewitten.
(xd_retrieve_arg): Split implementation of DBUS_TYPE_BYTE and
DBUS_TYPE_(U)INT16. Don't call XD_DEBUG_MESSAGE with "%f" if not
appropriate.
(xd_read_message): Return Qnil. Don't signal an error; it is not
useful during event reading.
(Fdbus_register_signal): Signal an error if the check for
FUNCTIONP fails.
(Fdbus_register_method): New function. The implementation is not
complete, the call of the function signals an error therefore.
(Fdbus_unregister_object): New function, renamed from
Fdbus_unregister_signal. The initial check signals an error, if
it the objct is not well formed.
DBUS_TYPE_INT16, DBUS_TYPE_UINT16, DBUS_TYPE_INT64,
DBUS_TYPE_UINT64, DBUS_TYPE_DOUBLE and DBUS_TYPE_SIGNATURE.
Return float when DBUS_TYPE_INT32 or DBUS_TYPE_UINT32 do not fit
as number.
(Fdbus_call_method): Fix docstring.
New macros.
(XD_SYMBOL_TO_DBUS_TYPE): Renamed from
XD_LISP_SYMBOL_TO_DBUS_TYPE.
(XD_OBJECT_TO_DBUS_TYPE): Renamed from
XD_LISP_OBJECT_TO_DBUS_TYPE. Simplify.
(xd_signature): New function.
(xd_append_arg): Compute also signatures. Major rewrite.
(xd_retrieve_arg): Make debug messages friendly.
(Fdbus_call_method, Fdbus_send_signal): Extend docstring. Check
for signatures of arguments.
(Fdbus_call_method, Fdbus_send_signal): Apply type cast in
dbus_message_new_method_call and dbus_message_new_signal.
(Fdbus_register_signal): Rename unique_name to uname. Check
handler for FUNCTIONP instead of CHECK_SYMBOL. Handle case of
non-existing unique name. Fix typos in matching rule. Return an
object which is useful in Fdbus_unregister_signal.
(Fdbus_unregister_signal): Reimplementation, in order to remove
only the corresponding entry.
(Vdbus_registered_functions_table): Change the order of entries.
Apply these changes in xd_read_message and Fdbus_register_signal.
(Fdbus_call_method, Fdbus_send_signal, xd_read_message): Use
`unsigned int' instead of `uint'.
(xd_read_message, Fdbus_register_signal): Split expressions into
multiple lines before operators "&&" and "||", according to the
GNU Coding Standards.
manipulating the backtrace manually.
(make_lispy_event): Merge the ASCII and MULTIBYTE cases.
(struct backtrace, backtrace_list): Remove.
(command_loop_1): Remove dead var `no_direct'.
registered handler. There might be several handlers registered
for the same signal.
(Fdbus_register_signal): Don't overwrite a registration for the
same signal. Add a new registration if handlers are different.
(Vdbus_registered_functions_table): Rework doc string.
(Fdbus_register_signal): Use DBUS_MAXIMUM_NAME_LENGTH and
DBUS_MAXIMUM_MATCH_RULE_LENGTH for string lengths.
(Fdbus_call_method, Fdbus_send_signal, Fdbus_register_signal):
Unify argument lists.
(xd_read_message, Fdbus_register_signal) Reorder and extend event
arguments and hash table keys. Use unique name for service.
(Fdbus_unregister_signal): Remove checks.
(Vdbus_registered_functions_table): Fix doc string.
Move check for Vdbus_registered_functions_table to
xd_read_queued_messages.
(xd_read_queued_messages): Protect xd_read_message calls by
internal_condition_case_1.
Qdbus_system_bus and Qdbus_session_bus, respectively.
(Vdbus_intern_symbols): Removed.
(Vdbus_registered_functions_table): New hash table.
(XD_SYMBOL_INTERN_SYMBOL): Removed.
(xd_read_message, Fdbus_register_signal, Fdbus_unregister_signal):
Rewritten in order to manage registered functions by hash table
Vdbus_registered_functions_table.